1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-05 15:46:31 +01:00
Files
prometheus-operator/.golangci.yml
dongjiang fbe3356fe4 fix golangci-lint timeout
Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-01-22 11:26:51 +08:00

48 lines
1.0 KiB
YAML

run:
timeout: 10m
linters:
enable:
- revive
- gci
- depguard
- godot
- testifylint
- unconvert
- recvcheck
- iface
- exptostd
- nilnesserr
- sloglint
issues:
exclude-rules:
# Disable errcheck linter for test files.
- path: _test.go
linters:
- errcheck
# We *frequently* use the term 'new' in the context of properties
# (new and old properties),
# and we rarely use the 'new' built-in function.
# It's fine to ignore these cases.
- linters:
- revive
text: 'redefines-builtin-id: redefinition of the built-in function new'
linters-settings:
errcheck:
exclude-functions:
# Any error in HTTP handlers is handled by the server itself.
- (net/http.ResponseWriter).Write
gci:
sections:
- standard
- default
- prefix(github.com/prometheus-operator/prometheus-operator)
depguard:
rules:
forbid-pkg-errors:
deny:
- pkg: "github.com/pkg/errors"
dsc: Should be replaced with standard lib errors or fmt.Errorf