-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.golangci.yml
189 lines (185 loc) · 4.05 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
output:
sort-results: true
run:
modules-download-mode: vendor
timeout: 5m
build-tags:
- integration
issues:
exclude-use-default: false
max-same-issues: 0
max-issues-per-linter: 0
exclude-rules:
# Ignore magic numbers in klog.V() calls until we clean them up.
- linters:
- gomnd
source: "klog.V\\("
# Ignore URLs in comments.
- linters:
- lll
source: "http(s)://"
# Allow use of fmt.Print* functions in cmd package and in tests.
- linters:
- forbidigo
text: "use of `fmt.Printf` forbidden by pattern"
path: cmd/
- linters:
- forbidigo
text: "use of `fmt.Println` forbidden by pattern"
path: cmd/
- linters:
- forbidigo
text: "use of `fmt.Printf` forbidden by pattern"
path: "_test.go"
- linters:
- forbidigo
text: "use of `fmt.Println` forbidden by pattern"
path: "_test.go"
# Allow to return unwrapped errors from external packages, as we do not use typed errors yet.
- linters:
- wrapcheck
text: "error returned from external package is unwrapped"
- linters:
- wrapcheck
text: "error returned from interface method should be wrapped"
# False positive: https://github.com/kunwardeep/paralleltest/issues/8.
- linters:
- paralleltest
text: "does not use range value in test Run"
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
gci:
local-prefixes: github.com/flatcar/flatcar-linux-update-operator
godot:
capital: true
gofumpt:
extra-rules: true
govet:
enable-all: true
disable:
- fieldalignment
- shadow
makezero:
always: true
nolintlint:
allow-leading-space: false
require-explanation: true
require-specific: true
varnamelen:
ignore-names:
- ok
wsl:
force-err-cuddling: true
# Update list of enabled linters using 'make update-linters'.
linters:
disable-all: false
disable:
# There is no need for whitelist of allowed dependencies.
- depguard
# We use different import grouping style than gci forces.
- gci
# We still have many globals to get rid of.
- gochecknoglobals
# TODOs in the code are OK.
- godox
# We do not have clearly defined error types yet.
- goerr113
# We do not require all used structs to have all fields initialized.
- exhaustivestruct
- exhaustruct
# We do not care about the memory efficiency really.
- maligned
# We allow returning interfaces for defensive programming.
- ireturn
# This linter has been deprecated.
- interfacer
# This linter has been deprecated.
- scopelint
# This linter has been deprecated.
- golint
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forbidigo
- forcetypeassert
- funlen
- gocheckcompilerdirectives
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- gofmt
- gofumpt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosmopolitan
- grouper
- importas
- ineffassign
- interfacebloat
- lll
- maintidx
- makezero
- mirror
- misspell
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- nonamedreturns
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- stylecheck
- tagalign
- tagliatelle
- tenv
- testableexamples
- testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- usestdlibvars
- varnamelen
- wastedassign
- whitespace
- wrapcheck
- wsl
- zerologlint