mirror of
https://github.com/docker/compose.git
synced 2026-11-16 21:22:56 +00:00
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:
parent
6d2e1d99dd
commit
d48a499a65
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue