mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-08-05 16:44:06 +02:00
ci: set GOTOOLCHAIN=auto inline for the modernize task
A task-level env: entry does not override GOTOOLCHAIN when setup-go has already exported GOTOOLCHAIN=local job-wide, so the autofix job still failed. Set GOTOOLCHAIN=auto inline on the modernize command itself, which reliably overrides the inherited value and lets Go fetch the toolchain the modernize analyzer requires.
This commit is contained in:
+4
-6
@@ -265,13 +265,11 @@ tasks:
|
||||
desc: Modernize Go code to use modern idioms
|
||||
silent: true
|
||||
aliases: [modern]
|
||||
env:
|
||||
# The modernize analyzer (shipped with gopls) may require a newer Go
|
||||
# toolchain than this project targets. Allow Go to fetch it on demand
|
||||
# instead of failing under GOTOOLCHAIN=local, which setup-go sets in CI.
|
||||
GOTOOLCHAIN: auto
|
||||
cmds:
|
||||
- go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
|
||||
# The modernize analyzer (shipped with gopls) may require a newer Go
|
||||
# toolchain than this project targets, so it is run with GOTOOLCHAIN=auto
|
||||
# to let Go fetch the toolchain it needs on demand.
|
||||
- GOTOOLCHAIN=auto go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
|
||||
- echo "Code modernized"
|
||||
|
||||
# Dependency management
|
||||
|
||||
Reference in New Issue
Block a user