-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
202 lines (202 loc) · 4.34 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
linters:
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- contextcheck
- copyloopvar
- errcheck
- errname
- errorlint
- exhaustive
- exhaustruct
- forcetypeassert
- gci
- ginkgolinter
- gocheckcompilerdirectives
- goconst
- godot
- goprintffuncname
- gosec
- gosimple
- govet
- grouper
- iface
- inamedparam
- ineffassign
- intrange
- lll
- makezero
- mirror
- misspell
- musttag
- nakedret
- noctx
- nolintlint
- nosprintfhostport
- predeclared
- protogetter
- recvcheck
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- tagalign
- tagliatelle
- testableexamples
- testpackage
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- wrapcheck
linters-settings:
exhaustive:
check:
- switch
- map
explicit-exhaustive-switch: true
explicit-exhaustive-map: true
gci:
sections:
- standard
- default
- localmodule
ginkgolinter:
forbid-spec-pollution: true
force-expect-to: true
godot:
scope: toplevel
capital: true
gosec:
excludes:
- G103
- G104
- G204
- G301
- G302
- G304
- G307
grouper:
import-require-single-import: true
import-require-grouping: true
const-require-grouping: true
var-require-grouping: true
inamedparam:
skip-single-param: false
lll:
tab-width: 4
nakedret:
max-func-lines: 0
revive:
ignore-generated-header: true
severity: error
rules:
- name: atomic
- name: bare-return
- name: blank-imports
- name: bool-literal-in-expr
- name: call-to-gc
- name: comment-spacings
- name: confusing-naming
- name: confusing-results
- name: context-as-argument
- name: context-keys-type
- name: datarace
- name: deep-exit
- name: defer
- name: dot-imports
arguments:
allowedPackages:
- 'github.com/onsi/gomega'
- 'github.com/onsi/gomega/gstruct'
- name: duplicated-imports
- name: early-return
arguments:
- "preserveScope"
- name: empty-block
- name: enforce-map-style
arguments: 'make'
exclude:
- 'TEST'
- name: enforce-repeated-arg-type-style
arguments: 'short'
- name: enforce-slice-style
arguments: 'make'
exclude:
- 'TEST'
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
arguments:
- 'checkPrivateReceivers'
- 'checkPublicInterface'
- 'disableStutteringCheck'
- name: filename-format
arguments:
- '^[a-z_][a-z0-9_]*\.go'
- name: get-return
- name: identical-branches
- name: if-return
- name: import-alias-naming
- name: import-shadowing
- name: increment-decrement
- name: indent-error-flow
- name: modifies-parameter
- name: modifies-value-receiver
- name: nested-structs
exclude:
- 'TEST'
- name: package-comments
- name: range-val-address
- name: range-val-in-closure
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: redundant-import-alias
- name: string-of-int
- name: struct-tag
- name: superfluous-else
- name: time-equal
- name: time-naming
- name: unconditional-recursion
- name: unexported-naming
- name: unexported-return
- name: unnecessary-stmt
- name: unreachable-code
- name: unused-parameter
- name: unused-receiver
- name: use-any
- name: useless-break
- name: var-naming
- name: waitgroup-by-value
tagalign:
align: false
sort: true
strict: true
whitespace:
multi-func: true
multi-if: true
wrapcheck:
ignoreSigs:
- 'errorz.Wrap'
- 'errorz.MaybeWrap'
- 'errorz.Errorf'
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-use-default: false
exclude-rules:
- path: '_test\.go'
linters:
- exhaustruct
- forcetypeassert
- goconst
- lll
- wrapcheck