Adopts the shared canonical .golangci.yml on branch golangci-v2.12.2.
Config change
The old config's top-level linters-settings block was silently ignored under the v2 schema; the canonical config puts settings under linters.settings, so the lll (88), funlen, cyclop, and dupl (100) thresholds now actually apply.
The four repo-specific disables (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 //nolint directives carrying the original approval dates: file-level //nolint:mnd on the 26 C-faithful gameplay files, file-level //nolint:testpackage on the 10 white-box test files, and per-switch //nolint:exhaustive on 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 and t.TempDir()); suite passes.
lll: all 24 overlong lines fixed (signatures wrapped, comments tightened or moved above).
mnd in term/tcell.go: control-code returns rewritten as character literals ('\b', '\x7f', '\x03').
wsl_v5: two defer-cuddle fixes in game/save.go and game/score.go (previously masked by same-line mnd findings via uniq-by-line).
dupl: the three identically-shaped item data tables in game/tables.go are marked //nolint:dupl — they are distinct game data, not duplicated logic.
No behavior changes; make check is green.
Version pin
There is no golangci-lint version reference anywhere in the repo to bump: no Dockerfile, no CI workflow, and make lint runs the host golangci-lint binary unpinned (currently v2.12.2 here). Per the rollout rules no new pinning infrastructure was invented.
Note: golangci-lint v2.12.2 warns that gomodguard is deprecated in favor of gomodguard_v2; that is a canonical-config concern, not repo-specific.
Adopts the shared canonical `.golangci.yml` on branch `golangci-v2.12.2`.
## Config change
- The old config's top-level `linters-settings` block was silently ignored under the v2 schema; the canonical config puts settings under `linters.settings`, so the `lll` (88), `funlen`, `cyclop`, and `dupl` (100) thresholds now actually apply.
- The four repo-specific disables (`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 `//nolint` directives carrying the original approval dates: file-level `//nolint:mnd` on the 26 C-faithful gameplay files, file-level `//nolint:testpackage` on the 10 white-box test files, and per-switch `//nolint:exhaustive` on 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 and `t.TempDir()`); suite passes.
- `lll`: all 24 overlong lines fixed (signatures wrapped, comments tightened or moved above).
- `mnd` in `term/tcell.go`: control-code returns rewritten as character literals (`'\b'`, `'\x7f'`, `'\x03'`).
- `wsl_v5`: two defer-cuddle fixes in `game/save.go` and `game/score.go` (previously masked by same-line `mnd` findings via `uniq-by-line`).
- `dupl`: the three identically-shaped item data tables in `game/tables.go` are marked `//nolint:dupl` — they are distinct game data, not duplicated logic.
No behavior changes; `make check` is green.
## Version pin
There is no golangci-lint version reference anywhere in the repo to bump: no Dockerfile, no CI workflow, and `make lint` runs the host `golangci-lint` binary unpinned (currently v2.12.2 here). Per the rollout rules no new pinning infrastructure was invented.
Note: golangci-lint v2.12.2 warns that `gomodguard` is deprecated in favor of `gomodguard_v2`; that is a canonical-config concern, not repo-specific.
Replace .golangci.yml with the shared canonical config. The old
config's top-level linters-settings block was silently ignored under
the v2 schema, so the lll/funlen/cyclop/dupl thresholds now actually
apply. The four repo-specific disables (mnd, exhaustive, paralleltest,
testpackage) move out of the config into targeted in-code nolint
directives carrying their original approval dates, keeping the config
byte-identical to the canonical one.
Fixes surfaced by the stricter settings: t.Parallel() added to all 32
tests, 24 overlong lines wrapped or their comments tightened, tcell
control-code returns rewritten as character literals, dupl markers on
the identically-shaped item data tables, and two wsl_v5 defer cuddles.
No behavior changes. The repo has no golangci-lint version pin (no
Dockerfile or CI; make lint runs the host binary, currently v2.12.2),
so there was nothing to bump.
sneak
merged commit d6cd418f38 into main2026-08-07 23:24:38 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.