forked from prometheus-operator/prometheus-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
46 lines (43 loc) · 1.06 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
run:
deadline: 10m
linters:
enable:
- revive
- gci
- depguard
- godot
- testifylint
- unconvert
- recvcheck
- iface
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
# Never check for logger errors.
- (github.com/go-kit/log.Logger).Log
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