Update golangci-lint to v2.12.2 with canonical config #1
Reference in New Issue
Block a user
Delete Branch "golangci-v2.12.2"
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?
Adopts the shared canonical
.golangci.ymlon branchgolangci-v2.12.2.Config change
linters-settingsblock was silently ignored under the v2 schema; the canonical config puts settings underlinters.settings, so thelll(88),funlen,cyclop, anddupl(100) thresholds now actually apply.mnd,exhaustive,paralleltest,testpackage) are removed from the config so it stays byte-identical to canonical. Their previously approved exceptions (2026-07-06/07) now live as targeted in-code//nolintdirectives carrying the original approval dates: file-level//nolint:mndon the 26 C-faithful gameplay files, file-level//nolint:testpackageon the 10 white-box test files, and per-switch//nolint:exhaustiveon the 20 C-faithful switches. Reverting any of these exceptions is now a per-file/per-site decision instead of a package-wide one.Real fixes
paralleltest:t.Parallel()added to all 32 tests (they already use isolated game instances andt.TempDir()); suite passes.lll: all 24 overlong lines fixed (signatures wrapped, comments tightened or moved above).mndinterm/tcell.go: control-code returns rewritten as character literals ('\b','\x7f','\x03').wsl_v5: two defer-cuddle fixes ingame/save.goandgame/score.go(previously masked by same-linemndfindings viauniq-by-line).dupl: the three identically-shaped item data tables ingame/tables.goare marked//nolint:dupl— they are distinct game data, not duplicated logic.No behavior changes;
make checkis green.Version pin
There is no golangci-lint version reference anywhere in the repo to bump: no Dockerfile, no CI workflow, and
make lintruns the hostgolangci-lintbinary unpinned (currently v2.12.2 here). Per the rollout rules no new pinning infrastructure was invented.Note: golangci-lint v2.12.2 warns that
gomodguardis deprecated in favor ofgomodguard_v2; that is a canonical-config concern, not repo-specific.