-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.golangci.yml
63 lines (61 loc) · 1.41 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
linters:
enable:
# Default linters plus these:
- bodyclose
- durationcheck
- errname
- errorlint
- exhaustive
- exportloopref # After minimum Go version hits 1.22, replace this with 'copyloopvar'
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gofmt
- gosec
- ireturn
- makezero
- misspell
- mnd
- nakedret
- nilerr
- noctx
- nolintlint
- paralleltest
- revive
- unconvert
- unparam
issues:
include:
# Re-enable revive's doc comment linters:
- EXC0012
- EXC0013
- EXC0014
- EXC0015
exclude-rules:
# Pipes are best used as pre-compiled globals, much like regexp.Mustcompile()
- text: ".*Pipe is a global variable"
linters:
- gochecknoglobals
# Reflection is slow, so some global reflect types are ok
- text: ".*Type is a global variable"
source: ".*Type *= *reflect.TypeOf\\(.*"
linters:
- gochecknoglobals
# False positive for paralleltest usage detection
- text: "Range statement for test Test.* does not use range value in test Run"
linters:
- paralleltest
linters-settings:
ireturn:
allow:
# Defaults:
- anon
- error
- empty
- generic
- stdlib
# Also allow these common interfaces:
- github\.com\/go-git\/go-billy\/v5
- golang\.org\/x\/tools\/godoc\/vfs