1
- run :
2
- timeout : 10m
1
+ linters :
2
+ enable-all : true
3
+ disable :
4
+ - gomnd # deprecated
5
+ - cyclop # duplicate of gocyclo
6
+ - sqlclosecheck # not relevant (SQL)
7
+ - rowserrcheck # not relevant (SQL)
8
+ - execinquery # not relevant (SQL)
9
+ - lll
10
+ - gosec
11
+ - dupl # not relevant
12
+ - prealloc # too many false-positive
13
+ - bodyclose # too many false-positive
14
+ - mnd
15
+ - testpackage # not relevant
16
+ - tparallel # not relevant
17
+ - paralleltest # not relevant
18
+ - nestif # too many false-positive
19
+ - wrapcheck
20
+ - err113 # not relevant
21
+ - nlreturn # not relevant
22
+ - wsl # not relevant
23
+ - exhaustive # not relevant
24
+ - exhaustruct # not relevant
25
+ - makezero # not relevant
26
+ - forbidigo
27
+ - varnamelen # not relevant
28
+ - nilnil # not relevant
29
+ - ireturn # not relevant
30
+ - contextcheck # too many false-positive
31
+ - tenv # we already have a test "framework" to handle env vars
32
+ - noctx
33
+ - forcetypeassert
34
+ - tagliatelle
35
+ - errname
36
+ - errchkjson
37
+ - nonamedreturns
38
+ - musttag # false-positive https://github.com/junk1tm/musttag/issues/17
39
+ - gosmopolitan # not relevant
40
+ - exportloopref # Useless with go1.22
41
+ - canonicalheader # Can create side effects in the context of API clients
42
+ - usestdlibvars # false-positive https://github.com/sashamelentyev/usestdlibvars/issues/96
3
43
4
44
linters-settings :
5
45
govet :
@@ -96,50 +136,18 @@ linters-settings:
96
136
sprintf1 : true
97
137
strconcat : false
98
138
99
- linters :
100
- enable-all : true
101
- disable :
102
- - gomnd # deprecated
103
- - cyclop # duplicate of gocyclo
104
- - sqlclosecheck # not relevant (SQL)
105
- - rowserrcheck # not relevant (SQL)
106
- - execinquery # not relevant (SQL)
107
- - lll
108
- - gosec
109
- - dupl # not relevant
110
- - prealloc # too many false-positive
111
- - bodyclose # too many false-positive
112
- - mnd
113
- - testpackage # not relevant
114
- - tparallel # not relevant
115
- - paralleltest # not relevant
116
- - nestif # too many false-positive
117
- - wrapcheck
118
- - err113 # not relevant
119
- - nlreturn # not relevant
120
- - wsl # not relevant
121
- - exhaustive # not relevant
122
- - exhaustruct # not relevant
123
- - makezero # not relevant
124
- - forbidigo
125
- - varnamelen # not relevant
126
- - nilnil # not relevant
127
- - ireturn # not relevant
128
- - contextcheck # too many false-positive
129
- - tenv # we already have a test "framework" to handle env vars
130
- - noctx
131
- - forcetypeassert
132
- - tagliatelle
133
- - errname
134
- - errchkjson
135
- - nonamedreturns
136
- - musttag # false-positive https://github.com/junk1tm/musttag/issues/17
137
- - gosmopolitan # not relevant
138
- - exportloopref # Useless with go1.22
139
- - canonicalheader # Can create side effects in the context of API clients
140
- - usestdlibvars # false-positive https://github.com/sashamelentyev/usestdlibvars/issues/96
139
+ run :
140
+ timeout : 10m
141
+
142
+ output :
143
+ show-stats : true
144
+ sort-results : true
145
+ sort-order :
146
+ - linter
147
+ - file
141
148
142
149
issues :
150
+ exclude-generated : strict
143
151
exclude-use-default : false
144
152
max-issues-per-linter : 0
145
153
max-same-issues : 0
@@ -160,86 +168,96 @@ issues:
160
168
- path : providers/dns/dns_providers.go
161
169
linters :
162
170
- gocyclo
163
- - path : providers/dns/gcloud/googlecloud_test.go
164
- text : ' string `(lego\.wtf|manhattan)` has (\d+) occurrences, make it a constant'
165
- - path : providers/dns/zoneee/zoneee_test.go
166
- text : ' string `(bar|foo)` has (\d+) occurrences, make it a constant'
167
171
- path : certcrypto/crypto.go
168
172
text : ' (tlsFeatureExtensionOID|ocspMustStapleFeature) is a global variable'
173
+ linters :
174
+ - gochecknoglobals
169
175
- path : challenge/dns01/nameserver.go
170
176
text : ' (defaultNameservers|recursiveNameservers|fqdnSoaCache|muFqdnSoaCache) is a global variable'
177
+ linters :
178
+ - gochecknoglobals
171
179
- path : challenge/dns01/nameserver_.+.go
172
180
text : ' dnsTimeout is a global variable'
181
+ linters :
182
+ - gochecknoglobals
173
183
- path : challenge/dns01/nameserver_test.go
174
184
text : ' findXByFqdnTestCases is a global variable'
185
+ linters :
186
+ - gochecknoglobals
175
187
- path : challenge/http01/domain_matcher.go
176
188
text : ' string `Host` has \d occurrences, make it a constant'
189
+ linters :
190
+ - goconst
177
191
- path : challenge/http01/domain_matcher.go
178
192
text : ' cyclomatic complexity \d+ of func `parseForwardedHeader` is high'
193
+ linters :
194
+ - gocyclo
179
195
- path : challenge/http01/domain_matcher.go
180
196
text : " Function 'parseForwardedHeader' has too many statements"
197
+ linters :
198
+ - funlen
181
199
- path : challenge/tlsalpn01/tls_alpn_challenge.go
182
200
text : ' idPeAcmeIdentifierV1 is a global variable'
201
+ linters :
202
+ - gochecknoglobals
183
203
- path : log/logger.go
184
204
text : ' Logger is a global variable'
205
+ linters :
206
+ - gochecknoglobals
185
207
- path : ' e2e/(dnschallenge/)?[\d\w]+_test.go'
186
208
text : load is a global variable
209
+ linters :
210
+ - gochecknoglobals
187
211
- path : ' providers/dns/([\d\w]+/)*[\d\w]+_test.go'
188
212
text : ' envTest is a global variable'
213
+ linters :
214
+ - gochecknoglobals
189
215
- path : ' providers/http/([\d\w]+/)*[\d\w]+_test.go'
190
216
text : ' envTest is a global variable'
217
+ linters :
218
+ - gochecknoglobals
191
219
- path : providers/dns/namecheap/namecheap_test.go
192
220
text : ' testCases is a global variable'
221
+ linters :
222
+ - gochecknoglobals
193
223
- path : providers/dns/acmedns/acmedns_test.go
194
224
text : ' egTestAccount is a global variable'
225
+ linters :
226
+ - gochecknoglobals
195
227
- path : providers/http/memcached/memcached_test.go
196
228
text : ' memcachedHosts is a global variable'
197
- - path : providers/dns/sakuracloud/client_test.go
198
- text : ' cyclomatic complexity 13 of func `(TestDNSProvider_cleanupTXTRecord_concurrent|TestDNSProvider_addTXTRecord_concurrent)` is high'
199
- - path : providers/dns/dns_providers.go
200
- text : " Function 'NewDNSChallengeProviderByName' has too many statements"
201
- - path : cmd/flags.go
202
- text : " Function 'CreateFlags' is too long"
203
- - path : certificate/certificates.go
204
- text : " Function 'GetOCSP' is too long"
205
- - path : providers/dns/otc/client.go
206
- text : " Function 'loginRequest' is too long"
207
- - path : providers/dns/gandi/gandi.go
208
- text : " Function 'Present' is too long"
229
+ linters :
230
+ - gochecknoglobals
209
231
- path : cmd/zz_gen_cmd_dnshelp.go
210
232
linters :
211
233
- gocyclo
212
234
- funlen
213
235
- path : providers/dns/checkdomain/internal/types.go
214
236
text : ' `payed` is a misspelling of `paid`'
215
- - path : providers/dns/namecheap/namecheap_test.go
216
- text : ' cognitive complexity (\d+) of func `TestDNSProvider_getHosts` is high '
237
+ linters :
238
+ - misspell
217
239
- path : platform/tester/env_test.go
218
240
linters :
219
241
- thelper
220
242
- path : providers/dns/oraclecloud/oraclecloud_test.go
221
243
text : ' SA1019: x509.EncryptPEMBlock has been deprecated since Go 1.16'
222
- - path : challenge/http01/domain_matcher.go
223
- text : ' yodaStyleExpr'
224
- - path : providers/dns/dns_providers.go
225
- text : ' Function name: NewDNSChallengeProviderByName,'
244
+ linters :
245
+ - staticcheck
226
246
- path : providers/dns/sakuracloud/wrapper.go
227
247
text : ' mu is a global variable'
228
- - path : providers/dns/hosttech/internal/client_test.go
229
- text : ' Duplicate words \(0\) found '
248
+ linters :
249
+ - gochecknoglobals
230
250
- path : cmd/cmd_renew.go
231
251
text : ' cyclomatic complexity \d+ of func `(renewForDomains|renewForCSR)` is high'
252
+ linters :
253
+ - gocyclo
232
254
- path : providers/dns/cpanel/cpanel.go
233
255
text : ' cyclomatic complexity 13 of func `\(\*DNSProvider\)\.CleanUp` is high'
256
+ linters :
257
+ - gocyclo
234
258
235
259
# Those elements have been replaced by non-exposed structures.
236
260
- path : providers/dns/linode/linode_test.go
237
261
linters :
238
262
- staticcheck
239
263
text : " SA1019: linodego\\ .(DomainsPagedResponse|DomainRecordsPagedResponse) is deprecated"
240
-
241
- output :
242
- sort-results : true
243
- sort-order :
244
- - linter
245
- - file
0 commit comments