-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
216 lines (207 loc) · 3.98 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
run:
concurrency: 4
timeout: 10m
issues-exit-code: 1
tests: false
skip-dirs:
- ds/tree/btree
- bitmap1024/internal
skip-dirs-use-default: true
allow-parallel-runners: false
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
sort-results: true
linters-settings:
dogsled:
max-blank-identifiers: 2
dupl:
threshold: 100
errcheck:
check-type-assertions: false
check-blank: false
exhaustive:
check-generated: false
default-signifies-exhaustive: true
funlen:
lines: 120
statements: 60
gocognit:
min-complexity: 20
nestif:
min-complexity: 4
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks:
- commentFormatting
- ifElseChain
gocyclo:
min-complexity: 20
godot:
scope: declarations
capital: false
godox:
keywords:
- NOTE
- OPTIMIZE
- HACK
gofmt:
simplify: true
goimports:
local-prefixes: github.com/org/project
golint:
min-confidence: 0.8
gomnd:
settings:
mnd:
checks:
- argument
- case
- condition
- return
ignored-numbers: 0,1
gomodguard:
blocked:
local_replace_directives: false
govet:
check-shadowing: true
fieldalignment: true
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
enable:
- atomicalign
enable-all: false
disable:
- shadow
disable-all: false
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/sirupsen/logrus
packages-with-error-message:
- github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
lll:
line-length: 600
tab-width: 1
misspell:
locale: US
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true
for-loops: false
predeclared:
ignore: ""
q: false
nolintlint:
allow-leading-space: true
require-explanation: true
require-specific: true
rowserrcheck:
packages:
- github.com/jmoiron/sqlx
testpackage:
skip-regexp: (export|internal)_test\.go
thelper:
test:
first: true
name: true
begin: true
benchmark:
first: true
name: true
begin: true
unparam:
check-exported: false
unused:
check-exported: false
whitespace:
multi-if: false
multi-func: false
wsl:
strict-append: true
allow-assign-and-call: true
allow-multiline-assign: true
allow-cuddle-declarations: false
allow-trailing-comment: false
force-case-trailing-whitespace: 0
force-err-cuddling: false
allow-separated-leading-comment: false
gofumpt:
extra-rules: false
errorlint:
errorf: true
makezero:
always: false
forbidigo:
forbid:
- fmt.Errorf
- fmt.Print.*
- ginkgo\\.F.*
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- stylecheck
- typecheck
- unused
- asciicheck
- bodyclose
- dupl
- exportloopref
- funlen
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gosec
- lll
- nestif
- prealloc
- predeclared
- unparam
- megacheck
- govet
issues:
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- lll
- funlen
- linters:
- gocyclo
- errcheck
- dupl
- gosec
- lll
- funlen
source: "^//go:generate "
severity:
default-severity: error
case-sensitive: false
rules:
- linters:
- dupl
severity: info