golangci-lint v2.12.2 deprecates the gomodguard linter; migrate to gomodguard_v2 #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Filed from #17 / PR #40 rather than fixed drive-by — it is outside that
issue's scope and belongs to whoever owns the linter configuration.
What happens
Running
cd backend && make checkon a host whose golangci-lint isv2.12.2 — the version #14/#31 moves the pin to — emits:
It is a warning, not a failure: the run still ends
0 issues.andmake checkexits 0.Why it is not visible in CI yet
Dockerfile.backendonmainpins golangci-lint v2.7.2(
9f61b0f53f80672872fced07b6874397c3ed197b), which predates the deprecation,so the containerised gate is silent. The warning only shows on a developer
machine running a newer linter. Once #31 lands and the pin moves to v2.12.2
(
c0d3ddc9cf3faa61a4e378e879ece580256d76e5), it will appear in everydocker build -f Dockerfile.backend .log as well.gomodguardis reached vialinters.default: allinbackend/.golangci.yml,so it is enabled without being named anywhere in the config.
Definition of done
gomodguard_v2should be enabled, and configured withwhat (today
gomodguardhas no settings at all, so it is enforcingnothing).
cd backend && make checkanddocker build -f Dockerfile.backend .emit no deprecation warning.backend/.golangci.ymlis a byte-for-byte copyof the org-standard file guarded by a sha256 assertion, so this cannot
be a local edit. Either the canonical file in
sneak/promptschangesand the guard's hash is updated with it, or this issue is closed as
"upstream's problem" with the reasoning recorded here.
actually v2.12.2.
Verified on
mainatfbfe1df, host golangci-linthas version 2.12.2 built with go1.26.5, againstmain'sbackend/.golangci.yml.