-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
197 lines (195 loc) · 4.03 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
linters:
disable-all: true
enable:
- asciicheck
- bidichk
- copyloopvar
- decorder
- dupl
- errcheck
- errname
- errorlint
- exhaustive
- gci
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- gocognit
- gocritic
- gocyclo
- godot
- gofmt
- gofumpt
- goimports
- gosec
- gosimple
- govet
- inamedparam
- ineffassign
- intrange
- ireturn
- lll
- makezero
- mnd
- nilerr
- nilnil
- nolintlint
- paralleltest
# - prealloc # premature optimization
- revive
- rowserrcheck
- sloglint
- sqlclosecheck
- staticcheck
- stylecheck
- tagalign
- tagliatelle
- testifylint
- testpackage
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- wrapcheck
linters-settings:
copyloopvar:
check-alias: true
decorder:
disable-dec-order-check: false
dupl:
threshold: 100
errcheck:
check-type-assertions: true
exhaustive:
default-signifies-exhaustive: true
default-case-required: true
gci:
sections:
- standard
- default
- localmodule
custom-order: true
gocognit:
min-complexity: 20
gocritic:
enable-all: true
disabled-checks:
- deferInLoop
- hugeParam
- paramTypeCombine
- tooManyResultsChecker
gocyclo:
min-complexity: 20
gofmt:
rewrite-rules:
- pattern: "interface{}"
replacement: "any"
gosimple:
checks: [ "all" ]
govet:
enable-all: true
disable:
- fieldalignment # premature optimization
- shadow
ireturn:
reject:
- anon
lll:
line-length: 80
nilnil:
detect-opposite: true
nolintlint:
require-explanation: true
require-specific: true
paralleltest:
ignore-missing-subtests: true
revive:
enable-all-rules: true
rules:
- name: add-constant
arguments:
- maxLitCount: "4"
allowStrs: "\"\""
allowInts: "-1,0,1,2"
allowFloats: "-1.0,-1.,0.0,0.,1.0,1.,2.0,2."
ignoreFuncs: "os\\.*,fmt\\.Println,make,logger\\.*"
- name: argument-limit
disabled: true
- name: banned-characters
disabled: true
- name: bare-return
disabled: true
- name: cognitive-complexity
arguments: [ 20 ]
- name: comments-density
disabled: true
- name: cyclomatic
arguments: [ 20 ]
- name: enforce-map-style
disabled: true
- name: enforce-repeated-arg-type-style
disabled: true
- name: enforce-slice-style
disabled: true
- name: file-header
disabled: true
- name: file-length-limit
disabled: true
- name: filename-format
disabled: true
- name: function-length
disabled: true
- name: function-result-limit
arguments: [ 3 ]
- name: import-alias-naming
arguments:
- "^[a-zA-Z][a-zA-Z0-9]{0,}$"
- name: imports-blocklist
disabled: true
- name: line-length-limit
disabled: true
- name: max-control-nesting
disabled: true
- name: max-public-structs
disabled: true
- name: nested-structs
disabled: true
- name: range
disabled: true
- name: string-format
disabled: true
- name: unchecked-type-assertion
disabled: true
- name: var-naming
arguments:
- [ ]
- [ ]
- - skipPackageNameChecks: true
sloglint:
no-global: default
context: scope
static-msg: true
key-naming-case: snake
staticcheck:
checks: [ "all", "-S1008" ]
stylecheck:
checks: [ "all", "-ST1003" ]
tagliatelle:
case:
use-field-name: true
rules:
json: snake
yaml: kebab
testifylint:
enable-all: true
disable:
- require-error
issues:
exclude-rules:
- path: _test\.go
linters:
- dupl
- path: _test\.go
text: "add-constant:"