Commit c552c83
Pin goimports in pre-commit to v0.30.0 for Go 1.22 compat (#4160)
After pinning actions/setup-go to v6.4.0, the reusable-pre-commit job
runs with GOTOOLCHAIN=local (the v6 default). pre-commit installs the
Lint hook's `goimports@latest`, which now resolves to
golang.org/x/tools@v0.45.0 and requires Go >= 1.25 — install fails
under Go 1.22.12 with GOTOOLCHAIN=local, leaving generated files
un-formatted and breaking the Generate hook.
v0.30.0 is the last golang.org/x/tools release whose go.mod still
declares `go 1.22.0`; v0.31.0+ require Go 1.23+. Pinning here keeps
the pre-commit job honest on the declared 1.22.x toolchain instead of
silently auto-upgrading via GOTOOLCHAIN=auto, and bounds the blast
radius of future tools releases.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 75447b8 commit c552c83
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments