forked from go-acme/lego
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.toml
169 lines (158 loc) · 5.75 KB
/
.golangci.toml
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
[run]
deadline = "5m"
skip-files = []
[linters-settings]
[linters-settings.govet]
check-shadowing = true
[linters-settings.gocyclo]
min-complexity = 12.0
[linters-settings.maligned]
suggest-new = true
[linters-settings.goconst]
min-len = 3.0
min-occurrences = 3.0
[linters-settings.misspell]
locale = "US"
[linters-settings.depguard]
list-type = "blacklist"
include-go-root = false
packages = ["github.com/pkg/errors"]
[linters-settings.godox]
keywords = ["FIXME"]
[linters-settings.gocritic]
enabled-tags = ["diagnostic", "style", "performance"]
disabled-checks= [
"paramTypeCombine", # already handle by gofumpt.extra-rules
"whyNoLint", # already handle by nonolint
"unnamedResult",
"hugeParam",
"sloppyReassign",
"rangeValCopy",
"octalLiteral",
"ptrToRefParam",
]
[linters]
enable-all = true
disable = [
"interfacer", # deprecated
"maligned", # deprecated
"scopelint", # deprecated
"cyclop", # duplicate of gocyclo
"lll",
"gosec",
"dupl", # not relevant
"prealloc", # too many false-positive
"bodyclose", # too many false-positive
"gomnd",
"testpackage", # not relevant
"tparallel", # not relevant
"paralleltest", # not relevant
"nestif", # too many false-positive
"wrapcheck",
"goerr113", # not relevant
"nlreturn", # not relevant
"wsl", # not relevant
"exhaustive", # not relevant
"exhaustivestruct", # not relevant
"makezero", # not relevant
"ifshort", # not relevant
"forbidigo", # not relevant
"noctx",
"forcetypeassert",
]
[issues]
exclude-use-default = false
max-per-linter = 0
max-same-issues = 0
exclude = [
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked",
"exported (type|method|function) (.+) should have comment or be unexported",
"ST1000: at least one file in a package should have a package comment"
]
[[issues.exclude-rules]]
path = "(.+)_test.go"
linters = ["funlen", "goconst"]
[[issues.exclude-rules]]
path = "providers/dns/dns_providers.go"
linters = ["gocyclo"]
[[issues.exclude-rules]]
path = "providers/dns/gcloud/googlecloud_test.go"
text = "string `(lego\\.wtf|manhattan)` has (\\d+) occurrences, make it a constant"
[[issues.exclude-rules]]
path = "providers/dns/zoneee/zoneee_test.go"
text = "string `(bar|foo)` has (\\d+) occurrences, make it a constant"
[[issues.exclude-rules]]
path = "certcrypto/crypto.go"
text = "(tlsFeatureExtensionOID|ocspMustStapleFeature) is a global variable"
[[issues.exclude-rules]]
path = "challenge/dns01/nameserver.go"
text = "(defaultNameservers|recursiveNameservers|dnsTimeout|fqdnSoaCache|muFqdnSoaCache) is a global variable"
[[issues.exclude-rules]]
path = "challenge/dns01/nameserver_test.go"
text = "findXByFqdnTestCases is a global variable"
[[issues.exclude-rules]]
path = "challenge/http01/domain_matcher.go"
text = "string `Host` has \\d occurrences, make it a constant"
[[issues.exclude-rules]]
path = "challenge/http01/domain_matcher.go"
text = "cyclomatic complexity \\d+ of func `parseForwardedHeader` is high"
[[issues.exclude-rules]]
path = "challenge/http01/domain_matcher.go"
text = "Function 'parseForwardedHeader' has too many statements"
[[issues.exclude-rules]]
path = "challenge/tlsalpn01/tls_alpn_challenge.go"
text = "idPeAcmeIdentifierV1 is a global variable"
[[issues.exclude-rules]]
path = "log/logger.go"
text = "Logger is a global variable"
[[issues.exclude-rules]]
path = "e2e/(dnschallenge/)?[\\d\\w]+_test.go"
text = "load is a global variable"
[[issues.exclude-rules]]
path = "providers/dns/([\\d\\w]+/)*[\\d\\w]+_test.go"
text = "envTest is a global variable"
[[issues.exclude-rules]]
path = "providers/dns/namecheap/namecheap_test.go"
text = "testCases is a global variable"
[[issues.exclude-rules]]
path = "providers/dns/acmedns/acmedns_test.go"
text = "egTestAccount is a global variable"
[[issues.exclude-rules]]
path = "providers/http/memcached/memcached_test.go"
text = "memcachedHosts is a global variable"
[[issues.exclude-rules]]
path = "providers/dns/sakuracloud/client_test.go"
text = "cyclomatic complexity 13 of func `(TestDNSProvider_cleanupTXTRecord_concurrent|TestDNSProvider_addTXTRecord_concurrent)` is high"
[[issues.exclude-rules]]
path = "providers/dns/dns_providers.go"
text = "Function 'NewDNSChallengeProviderByName' has too many statements"
[[issues.exclude-rules]]
path = "cmd/flags.go"
text = "Function 'CreateFlags' is too long"
[[issues.exclude-rules]]
path = "certificate/certificates.go"
text = "Function 'GetOCSP' is too long"
[[issues.exclude-rules]]
path = "providers/dns/otc/client.go"
text = "Function 'loginRequest' is too long"
[[issues.exclude-rules]]
path = "providers/dns/gandi/gandi.go"
text = "Function 'Present' is too long"
[[issues.exclude-rules]]
path = "cmd/zz_gen_cmd_dnshelp.go"
linters = ["gocyclo", "funlen"]
[[issues.exclude-rules]]
path = "providers/dns/checkdomain/client.go"
text = "`payed` is a misspelling of `paid`"
[[issues.exclude-rules]]
path = "providers/dns/namecheap/namecheap_test.go"
text = "cognitive complexity (\\d+) of func `TestDNSProvider_getHosts` is high"
[[issues.exclude-rules]]
path = "platform/tester/env_test.go"
linters = ["thelper"]
[[issues.exclude-rules]]
path = "providers/dns/oraclecloud/oraclecloud_test.go"
text = "SA1019: x509.EncryptPEMBlock has been deprecated since Go 1.16"
[[issues.exclude-rules]]
path = "challenge/http01/domain_matcher.go"
text = "yodaStyleExpr"