-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
238 lines (238 loc) · 4.24 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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
---
issues:
exclude-rules:
- linters: [dupl, lll mnd]
path: (.+)_test\.go
exclude-use-default: true
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- decorder
- depguard
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- fatcontext
- forcetypeassert
- funlen
- gocheckcompilerdirectives
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- gofumpt
- gomoddirectives
- goprintffuncname
- gosec
- gosimple
- govet
- iface
- importas
- ineffassign
- interfacebloat
- intrange
- ireturn
- lll
- loggercheck
- makezero
- mirror
- misspell
- mnd
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
- perfsprint
- prealloc
- predeclared
- protogetter
- recvcheck
- revive
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- stylecheck
- tagliatelle
- testifylint
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
linters-settings:
decorder:
dec-order: [const, var, type, func]
depguard:
rules:
logger:
deny:
- desc: logging is allowed only by logutils.Log.
pkg: github.com/sirupsen/logrus
- desc: Should be replaced by standard lib errors package.
pkg: github.com/pkg/errors
dupl:
threshold: 100
errorlint:
asserts: false
funlen:
lines: 250
statements: 60
goconst:
min-len: 2
min-occurrences: 4
gocritic:
disabled-checks:
- dupImport
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 20
godox:
keywords:
- FIXME
- TODO
gofumpt:
extra-rules: true
module-path: ablibrary.net
gosec:
excludes:
- G306
- G307
govet:
disable:
- fieldalignment
- loopclosure
- shadow
enable-all: true
importas:
alias:
- alias: pter
pkg: ablibrary.net/internal/grpc/adapters
- alias: eter
pkg: ablibrary.net/internal/ent/adapters
lll:
line-length: 200
misspell:
locale: US
mnd:
checks: [argument, case, condition, return]
ignored-functions:
- (.*).IntRange
- helpers.Chance
- int
- int16
- int32
- int64
- int8
- make
- rune
- strings.SplitN
- uint
- uint16
- uint32
- uint64
- uint8
ignored-numbers:
- '0'
- '0o400'
- '0o600'
- '0o644'
- '0o755'
- '1'
- '1e3'
- '1e6'
- '1e9'
- '2'
- '3'
- '4'
- '5'
nolintlint:
allow-unused: false
require-explanation: true
require-specific: true
revive:
rules:
- arguments:
- 4
name: argument-limit
- name: atomic
- name: confusing-naming
- name: confusing-results
- name: constant-logical-expr
- name: context-as-argument
- name: context-keys-type
- name: datarace
- name: deep-exit
- name: defer
- name: duplicated-imports
- name: early-return
- disabled: true
name: enforce-repeated-arg-type-style
- arguments:
- make
name: enforce-map-style
- name: error-return
- name: error-naming
- name: error-strings
- name: errorf
- arguments:
- 3
name: function-result-limit
- name: get-return
- name: identical-branches
- name: if-return
- name: import-shadowing
- name: increment-decrement
- name: indent-error-flow
- arguments:
- 4
name: max-control-nesting
- name: modifies-value-receiver
- name: optimize-operands-order
- name: range-val-address
- name: receiver-naming
- name: redundant-import-alias
- name: string-of-int
- name: superfluous-else
- name: time-equal
- name: time-naming
- name: unchecked-type-assertion
- name: unconditional-recursion
- disabled: true
name: unexported-return
- name: unnecessary-stmt
- name: unreachable-code
- name: unused-parameter
- disabled: true
name: unused-receiver
- name: use-any
- name: waitgroup-by-value
tagliatelle:
case:
rules:
json: snake