-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.golangci.yaml
89 lines (87 loc) · 1.86 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
linters:
# Only run explicitly enabled linters
disable-all: true
# The list below includes pretty much all available linters from the "bugs",
# "format", and "performance" categories. However, we don't use most of the
# non-default "style", "comment", or "complexity" linters since they are often
# very opinionated and don't lead to better code per-se. We also don't use
# "musttag" or "perfsprint"
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- decorder
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- err113
- exhaustive
- fatcontext
- forbidigo
- gci
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- gofmt
- gofumpt
- goimports
- gosec
- gosimple
- gosmopolitan
- govet
- ineffassign
- lll
- loggercheck
- makezero
- misspell
- nilerr
- nilnesserr
- noctx
- paralleltest
- prealloc
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- spancheck
- sqlclosecheck
- staticcheck
- testifylint
- testpackage
- typecheck
- unused
- wrapcheck
- zerologlint
linters-settings:
forbidigo:
forbid:
- 'fmt\.Errorf' # Use internal errors package instead.
gci:
sections:
- standard
- default
- prefix(github.com/rwx-research)
- dot
wrapcheck:
ignoreSigRegexps:
- errors\.WithDecoration\(
- errors\.New.*Error\(
issues:
exclude-rules:
# Some of the rules can be relaxed for test files
- path: _test\.go
linters:
- wrapcheck
# Comments sometimes _have_ to be longer than the limit (e.g. URLs)
- linters:
- lll
source: "^\\s*// "
# Allow dot-imports for gomega and ginkgo
- linters:
- revive
source: "gomega|ginkgo"