-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
54 lines (51 loc) · 1.25 KB
/
.golangci.yaml
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
47
48
49
50
51
52
53
54
---
output:
sort-results: true
linters:
enable:
- depguard
- gocritic
- gofumpt
- goimports
- revive
- misspell
- unconvert
- unused
- wsl
issues:
max-same-issues: 0
exclude-rules:
- linters:
- gocritic
text: "appendAssign"
- path: _test.go
linters:
- errcheck
linters-settings:
depguard:
rules:
main:
files:
- $all
deny:
- pkg: "github.com/sirupsen/logrus"
desc: Not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
- pkg: "sync/atomic"
desc: Use go.uber.org/atomic instead of sync/atomic
- pkg: "io/ioutil"
desc: Use corresponding 'os' or 'io' functions instead.
errcheck:
exclude-functions:
# Don't flag lines such as "io.Copy(io.Discard, resp.Body)".
- io.Copy
# The next two are used in HTTP handlers, any error is handled by the server itself.
- io.WriteString
- (net/http.ResponseWriter).Write
# No need to check for errors on server's shutdown.
- (*net/http.Server).Shutdown
goimports:
local-prefixes: github.com/prometheus/prometheus
gofumpt:
extra-rules: true