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

67 lines
1.5 KiB
YAML
Raw Permalink Normal View History

version: "2"
2020-11-25 17:17:03 +01:00
run:
timeout: 10m
2020-11-25 17:17:03 +01:00
linters:
enable:
- depguard
- exptostd
- godot
- iface
- nilnesserr
- recvcheck
- revive
- sloglint
- testifylint
- unconvert
settings:
depguard:
rules:
forbid-pkg-errors:
deny:
- pkg: github.com/pkg/errors
desc: Should be replaced with standard lib errors or fmt.Errorf
errcheck:
exclude-functions:
# Any error in HTTP handlers is handled by the server itself.
- (net/http.ResponseWriter).Write
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
# Disable errcheck linter for test files.
- linters:
- errcheck
- staticcheck
- testifylint
path: _test.go
# 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'
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
settings:
gci:
sections:
- standard
- default
- prefix(github.com/prometheus-operator/prometheus-operator)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$