Skip to content

Commit

Permalink
fix: Remove gomnd from golangci linters (#1210)
Browse files Browse the repository at this point in the history
This linter causes more harm than good, encouraging practices that
actively obfuscate simple values whose meaning could be derived from
context. Since it has no context-awareness, it flags everything from
file modes, to obvious iteration counters as "magic numbers." This
determination is fairly straightforward for a reviewer to make by hand,
and it comes up relatively infrequently. The best course of action,
until a better (probably LLM-based) magic number detector can be found.
  • Loading branch information
timraymond authored Jan 10, 2025
1 parent b744ff1 commit 0c55e1d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ issues:
- path: pkg/metrics/types_windows.go
linters:
- revive
- mnd
- var-naming
- path: pkg/metrics/types_linux.go
linters:
- revive
- mnd
- var-naming
linters:
presets:
Expand All @@ -31,7 +29,6 @@ linters:
- gocritic
- gocyclo
- gofmt
- mnd
- goprintffuncname
- gosimple
- lll
Expand Down

0 comments on commit 0c55e1d

Please sign in to comment.