1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 09:16:38 +00:00
prometheus-operator/.golangci.yml

48 lines
1 KiB
YAML
Raw Normal View History

2020-11-25 17:17:03 +01:00
run:
timeout: 10m
2020-11-25 17:17:03 +01:00
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"
desc: Should be replaced with standard lib errors or fmt.Errorf