Bump golangci-lint to v2.13.2 so it can read Go 1.27 export data #3
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/golangci-lint-reads-go-1-27"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Renovate's Go 1.27 bump in the agent repo (run 178, PR #34) turned the
Lintstep red without reporting a single finding:golangci-lint typechecks through whichever
golang.org/x/toolsit was built against, and the pinned v2.6.1 carries v0.38.0 — too old to decode the export data Go 1.27's compiler emits. The linter could not import the standard library, so it linted nothing and exited 1. Nothing was wrong with the code.v2.13.2(x/tools v0.49.0) reads it. Measured on Go 1.27.1:So the pin has a floor as well as the ceiling it was introduced for: a Go bump needs the linter bumped alongside it, or the gate stops running rather than going red.
hack/lint.shnow says so where the pin lives..github/workflows/ci.yamlalso grew a note that itsgo installversion must equalhack/lint.sh'sVERSION— on a mismatch the script ignores the installed binary and falls back to the container, whose-v "$PWD":/appin a job step mounts an empty directory, i.e. a greenLintstep that read no code.Carried across all four Go repos
The pin and
.golangci.yamlare duplicated on purpose and are meant to stay identical, so this lands as the same change in each:someones.computer_agent,someones.computer_scclient,someones.computer_tray,someones.computer_terraform. Both file headers still said "three repos" and did not mention the terraform provider; they name four now.Verified
This repo has no CI workflow yet, so
hack/lint.shis the only place the pin lives — and the local gate is the whole of all-green here. Nothing trips the newer rulesets../hack/lint.sh→ 0 issues on Go 1.27.1 and on Go 1.26.7.go vet ./...clean,go test ./...passes, on Go 1.27.1.shellcheck -x -S warning hack/lint.shclean.Opened ready rather than draft because this repo has no
.github/workflows/, so there is no CI run coming to wait on — the local gate above is all of all-green here.Follow-up, deliberately out of scope
The platform repo's submodule pins move once these four merge, not before —
make lint-submodule-pinsrequires a pin on the default branch.