node_exporter/.golangci.yml
Kemal Akkoyun 3a094cfbdc
chore: Upgrade golangci-lint to v2
- Migrate the configuration file
- Update the tooling version and CI
- Apply auto-fixes

Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
2025-04-07 17:23:14 +02:00

49 lines
980 B
YAML

version: "2"
linters:
enable:
- depguard
- misspell
- revive
settings:
depguard:
rules:
no_exec_policy:
files:
- '!$test'
deny:
- pkg: os/exec
desc: Using os/exec to run sub processes it not allowed by policy
errcheck:
# Used in HTTP handlers, any error is handled by the server itself.
exclude-functions:
- (net/http.ResponseWriter).Write
revive:
rules:
- name: unused-parameter
severity: warning
disabled: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
path: _test.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$