-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yml
144 lines (140 loc) · 2.95 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
run:
concurrency: 8
issues-exit-code: 0
tests: true
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 3
min-occurrences: 3
gocognit:
min-complexity: 15
gocritic:
enabled-checks:
- appendCombine
- badCall
- badCond
- boolExprSimplify
- codegenComment
- commentFormatting
- commentedOutCode
- deprecatedComment
- dupImport
- emptyFallthrough
- emptyStringTest
- equalFold
- evalOrder
- exitAfterDefer
- flagName
- hexLiteral
- indexAlloc
- initClause
- methodExprCall
- nestingReduce
- newDeref
- nilValReturn
- offBy1
- ptrToRefParam
- rangeExprCopy
- regexpPattern
- sloppyReassign
- stringXbytes
- truncateCmp
- typeAssertChain
- typeUnparen
- underef
- unnecessaryBlock
- valSwap
- weakCond
- wrapperFunc
- yodaStyleExpr
govet:
check-shadowing: false
nolintlint:
require-explanation: true
require-specific: true
depguard:
rules:
logger:
deny:
# logging is allowed only by logutils.Log,
# logrus is allowed to use only in logutils package.
- pkg: "github.com/sirupsen/logrus"
desc: logging is allowed only by logutils.Log
linters:
disable-all: true
enable:
- bodyclose
- unused
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gomnd
- gocyclo
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
- nakedret
- prealloc
- predeclared
- revive
- staticcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- whitespace
fast: false
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- linters:
- ineffassign
text: ineffectual assignment to
- linters:
- gosec
text: "G204: Subprocess launched with a potential tainted input or cmd arguments"
- linters:
- golint
text: "don't use ALL_CAPS in Go names; use CamelCase"
- linters:
- golint
text: "don't use an underscore in package name"
- path: ".*_test.go"
linters:
- bodyclose
- funlen
- gocognit
- goconst
- path: ".*_test.go"
text: "Error return value is not checked"
linters:
- errcheck
- path: ".*_test.go"
text: "regexpMust"
linters:
- errcheck
- gocritic
- text: "commentedOutCode: may want to remove commented-out code"
linters:
- gocritic
- text: "commentFormatting: put a space between `//` and comment text"
linters:
- gocritic