lint: explicitly disable gocyclo so it doesn't sneak back in

gocognit replaced gocyclo on purpose: raw cyclomatic complexity
charges a flat guard clause the same as a deeply nested branch, so our
fail-fast style accumulated //nolint suppressions on functions that
are long but flat. Cognitive complexity penalizes nesting and barely
charges early returns, which keeps the linter's signal on genuinely
tangled code instead.

With 'default: none' the disable entry is functionally redundant, but
it records that decision exactly where someone would re-add the
linter, with a hard stop: golangci-lint rejects a config listing the
same linter in both enable and disable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2026-08-17 08:43:18 +02:00 • committed by Nicolas De loof
parent 6d2e1d99dd
commit d48a499a65

View file

@ -3,6 +3,13 @@ run:
concurrency: 2
linters:
default: none
disable:
# gocognit deliberately replaced gocyclo — do not re-enable. Cyclomatic
# complexity charges a flat guard clause the same as a nested branch, so
# our fail-fast style accumulated //nolint suppressions on functions that
# are long but flat. Cognitive complexity penalizes nesting and barely
# charges early returns, keeping the signal on genuinely tangled code.
- gocyclo
enable:
- copyloopvar
- depguard