ci: pin modernize tool to gopls v0.21.x for Go 1.25 compatibility

The autofix workflow's `task modernize` step installed the modernize
analyzer from gopls@latest, which as of v0.22.0 requires Go 1.26. The
project targets Go 1.25 (go.mod) and CI runs with GOTOOLCHAIN=local, so
the install failed. Pin to the v0.21.x line, which supports Go >= 1.25.
This commit is contained in:
2026-06-15 17:24:05 +00:00
parent d50a110351
commit 3b0090c692
+3 -1
View File
@@ -266,7 +266,9 @@ tasks:
silent: true
aliases: [modern]
cmds:
- go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
# Pinned to the v0.21.x line: newer gopls (v0.22+) requires Go 1.26, but
# this project targets Go 1.25 (see go.mod).
- go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.21.0 -fix -test ./...
- echo "Code modernized"
# Dependency management