2018-09-24 21:07:20 +02:00
|
|
|
[run]
|
2022-09-02 22:56:10 +02:00
|
|
|
timeout = "7m"
|
2018-12-06 23:50:17 +02:00
|
|
|
skip-files = []
|
2018-09-24 21:07:20 +02:00
|
|
|
|
|
|
|
[linters-settings]
|
|
|
|
|
|
|
|
[linters-settings.govet]
|
|
|
|
check-shadowing = true
|
|
|
|
|
|
|
|
[linters-settings.gocyclo]
|
2018-12-06 23:50:17 +02:00
|
|
|
min-complexity = 12.0
|
2018-09-24 21:07:20 +02:00
|
|
|
|
|
|
|
[linters-settings.maligned]
|
|
|
|
suggest-new = true
|
|
|
|
|
|
|
|
[linters-settings.goconst]
|
2018-12-06 23:50:17 +02:00
|
|
|
min-len = 3.0
|
2018-09-24 21:07:20 +02:00
|
|
|
min-occurrences = 3.0
|
|
|
|
|
2022-06-15 09:08:24 +02:00
|
|
|
[linters-settings.funlen]
|
|
|
|
lines = -1
|
|
|
|
statements = 50
|
|
|
|
|
2018-09-24 21:07:20 +02:00
|
|
|
[linters-settings.misspell]
|
|
|
|
locale = "US"
|
2021-06-14 02:44:13 +02:00
|
|
|
ignore-words = ["internetbs"]
|
2018-09-24 21:07:20 +02:00
|
|
|
|
2021-03-04 21:16:59 +02:00
|
|
|
[linters-settings.depguard]
|
2022-06-15 09:08:24 +02:00
|
|
|
list-type = "denylist"
|
2021-03-04 21:16:59 +02:00
|
|
|
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",
|
2021-06-08 11:09:39 +02:00
|
|
|
"appendAssign",
|
2021-11-03 21:39:12 +02:00
|
|
|
"ruleguard",
|
|
|
|
"httpNoBody",
|
|
|
|
"exposedSyncMutex",
|
2021-03-04 21:16:59 +02:00
|
|
|
]
|
|
|
|
|
2018-09-24 21:07:20 +02:00
|
|
|
[linters]
|
|
|
|
enable-all = true
|
|
|
|
disable = [
|
2022-09-02 09:05:52 +02:00
|
|
|
"deadcode", # deprecated
|
|
|
|
"exhaustivestruct", # deprecated
|
|
|
|
"golint", # deprecated
|
|
|
|
"ifshort", # deprecated
|
2021-03-04 21:16:59 +02:00
|
|
|
"interfacer", # deprecated
|
|
|
|
"maligned", # deprecated
|
2022-08-22 17:05:31 +02:00
|
|
|
"nosnakecase", # deprecated
|
2022-09-02 09:05:52 +02:00
|
|
|
"scopelint", # deprecated
|
|
|
|
"structcheck", # deprecated
|
|
|
|
"varcheck", # deprecated
|
2021-03-27 14:49:40 +02:00
|
|
|
"cyclop", # duplicate of gocyclo
|
2022-05-20 22:42:26 +02:00
|
|
|
"sqlclosecheck", # not relevant (SQL)
|
|
|
|
"rowserrcheck", # not relevant (SQL)
|
|
|
|
"execinquery", # not relevant (SQL)
|
2018-09-24 21:07:20 +02:00
|
|
|
"lll",
|
2021-03-27 14:49:40 +02:00
|
|
|
"gosec",
|
|
|
|
"dupl", # not relevant
|
|
|
|
"prealloc", # too many false-positive
|
|
|
|
"bodyclose", # too many false-positive
|
2020-02-10 19:20:52 +02:00
|
|
|
"gomnd",
|
2020-05-08 19:35:25 +02:00
|
|
|
"testpackage", # not relevant
|
2021-03-27 14:49:40 +02:00
|
|
|
"tparallel", # not relevant
|
|
|
|
"paralleltest", # not relevant
|
2020-05-08 19:35:25 +02:00
|
|
|
"nestif", # too many false-positive
|
2021-03-27 14:49:40 +02:00
|
|
|
"wrapcheck",
|
2020-05-08 19:35:25 +02:00
|
|
|
"goerr113", # not relevant
|
2020-10-27 13:01:05 +02:00
|
|
|
"nlreturn", # not relevant
|
2021-03-27 14:49:40 +02:00
|
|
|
"wsl", # not relevant
|
|
|
|
"exhaustive", # not relevant
|
2022-05-20 22:42:26 +02:00
|
|
|
"exhaustruct", # not relevant
|
2020-12-29 00:39:00 +02:00
|
|
|
"makezero", # not relevant
|
2021-03-27 14:49:40 +02:00
|
|
|
"forbidigo", # not relevant
|
2021-11-03 21:39:12 +02:00
|
|
|
"varnamelen", # not relevant
|
|
|
|
"nilnil", # not relevant
|
|
|
|
"ireturn", # not relevant
|
|
|
|
"contextcheck", # too many false-positive
|
|
|
|
"tenv", # we already have a test "framework" to handle env vars
|
2021-03-27 14:49:40 +02:00
|
|
|
"noctx",
|
2021-03-04 21:16:59 +02:00
|
|
|
"forcetypeassert",
|
2021-06-08 11:09:39 +02:00
|
|
|
"tagliatelle",
|
2021-08-25 11:44:11 +02:00
|
|
|
"errname",
|
2022-01-27 10:18:53 +02:00
|
|
|
"errchkjson",
|
2022-05-20 22:42:26 +02:00
|
|
|
"nonamedreturns",
|
2018-09-24 21:07:20 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
[issues]
|
2018-12-06 23:50:17 +02:00
|
|
|
exclude-use-default = false
|
2018-09-24 21:07:20 +02:00
|
|
|
max-per-linter = 0
|
2019-02-18 14:42:10 +02:00
|
|
|
max-same-issues = 0
|
2018-09-24 21:07:20 +02:00
|
|
|
exclude = [
|
2019-02-18 14:28:19 +02:00
|
|
|
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked",
|
2018-12-06 23:50:17 +02:00
|
|
|
"exported (type|method|function) (.+) should have comment or be unexported",
|
2022-09-02 09:05:52 +02:00
|
|
|
"ST1000: at least one file in a package should have a package comment",
|
|
|
|
"package-comments: should have a package comment",
|
2018-09-24 21:07:20 +02:00
|
|
|
]
|
2019-09-17 21:00:42 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "(.+)_test.go"
|
2022-01-27 10:18:53 +02:00
|
|
|
linters = ["funlen", "goconst", "maintidx"]
|
2019-02-18 14:28:19 +02:00
|
|
|
[[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"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "(tlsFeatureExtensionOID|ocspMustStapleFeature) is a global variable"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "challenge/dns01/nameserver.go"
|
2022-09-19 11:21:35 +02:00
|
|
|
text = "(defaultNameservers|recursiveNameservers|fqdnSoaCache|muFqdnSoaCache) is a global variable"
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "challenge/dns01/nameserver_.+.go"
|
|
|
|
text = "dnsTimeout is a global variable"
|
2019-10-25 00:58:50 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "challenge/dns01/nameserver_test.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "findXByFqdnTestCases is a global variable"
|
2019-10-05 13:44:38 +02:00
|
|
|
[[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"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "challenge/tlsalpn01/tls_alpn_challenge.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "idPeAcmeIdentifierV1 is a global variable"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "log/logger.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "Logger is a global variable"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "e2e/(dnschallenge/)?[\\d\\w]+_test.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "load is a global variable"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/([\\d\\w]+/)*[\\d\\w]+_test.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "envTest is a global variable"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/namecheap/namecheap_test.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "testCases is a global variable"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/acmedns/acmedns_test.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "egTestAccount is a global variable"
|
2019-02-18 14:28:19 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/http/memcached/memcached_test.go"
|
2020-10-27 13:01:05 +02:00
|
|
|
text = "memcachedHosts is a global variable"
|
2019-04-09 22:56:12 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/sakuracloud/client_test.go"
|
|
|
|
text = "cyclomatic complexity 13 of func `(TestDNSProvider_cleanupTXTRecord_concurrent|TestDNSProvider_addTXTRecord_concurrent)` is high"
|
2019-09-17 21:00:42 +02:00
|
|
|
[[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"
|
2019-10-25 01:27:40 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "cmd/zz_gen_cmd_dnshelp.go"
|
|
|
|
linters = ["gocyclo", "funlen"]
|
2019-12-08 00:59:59 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/checkdomain/client.go"
|
|
|
|
text = "`payed` is a misspelling of `paid`"
|
2020-02-10 19:20:52 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/namecheap/namecheap_test.go"
|
|
|
|
text = "cognitive complexity (\\d+) of func `TestDNSProvider_getHosts` is high"
|
2021-02-08 23:25:51 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "platform/tester/env_test.go"
|
|
|
|
linters = ["thelper"]
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/oraclecloud/oraclecloud_test.go"
|
2021-03-04 21:16:59 +02:00
|
|
|
text = "SA1019: x509.EncryptPEMBlock has been deprecated since Go 1.16"
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "challenge/http01/domain_matcher.go"
|
|
|
|
text = "yodaStyleExpr"
|
2022-01-27 10:18:53 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/dns_providers.go"
|
|
|
|
text = "Function name: NewDNSChallengeProviderByName,"
|
2022-08-04 15:56:46 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/sakuracloud/client.go"
|
|
|
|
text = "mu is a global variable"
|
2022-11-27 21:04:28 +02:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "providers/dns/hosttech/internal/client_test.go"
|
|
|
|
text = "Duplicate words \\(0\\) found"
|