From d48a499a65b42e690d5e7ec86d21acfeb86feeae Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Mon, 17 Aug 2026 08:43:18 +0200 Subject: [PATCH] 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 Signed-off-by: Nicolas De Loof --- .golangci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 1ba9cfd5f..b143fa85a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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