2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
enable-all: true
|
|
|
|
disable:
|
|
|
|
- cyclop # duplicate of gocyclo
|
|
|
|
- sqlclosecheck # not relevant (SQL)
|
|
|
|
- rowserrcheck # not relevant (SQL)
|
|
|
|
- lll
|
|
|
|
- gosec
|
|
|
|
- dupl # not relevant
|
|
|
|
- prealloc # too many false-positive
|
|
|
|
- bodyclose # too many false-positive
|
|
|
|
- mnd
|
|
|
|
- testpackage # not relevant
|
|
|
|
- tparallel # not relevant
|
|
|
|
- paralleltest # not relevant
|
|
|
|
- nestif # too many false-positive
|
|
|
|
- wrapcheck
|
|
|
|
- err113 # not relevant
|
|
|
|
- nlreturn # not relevant
|
|
|
|
- wsl # not relevant
|
|
|
|
- exhaustive # not relevant
|
|
|
|
- exhaustruct # not relevant
|
|
|
|
- makezero # not relevant
|
|
|
|
- forbidigo
|
|
|
|
- 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
|
|
|
|
- noctx
|
|
|
|
- forcetypeassert
|
|
|
|
- tagliatelle
|
|
|
|
- errname
|
|
|
|
- errchkjson
|
|
|
|
- nonamedreturns
|
|
|
|
- musttag # false-positive https://github.com/junk1tm/musttag/issues/17
|
|
|
|
- gosmopolitan # not relevant
|
|
|
|
- exportloopref # Useless with go1.22
|
|
|
|
- canonicalheader # Can create side effects in the context of API clients
|
|
|
|
- usestdlibvars # false-positive https://github.com/sashamelentyev/usestdlibvars/issues/96
|
2023-02-28 10:08:15 +02:00
|
|
|
|
|
|
|
linters-settings:
|
|
|
|
govet:
|
2024-03-20 21:30:35 +02:00
|
|
|
enable:
|
|
|
|
- shadow
|
2023-02-28 10:08:15 +02:00
|
|
|
gocyclo:
|
|
|
|
min-complexity: 12
|
|
|
|
goconst:
|
|
|
|
min-len: 3
|
|
|
|
min-occurrences: 3
|
|
|
|
funlen:
|
|
|
|
lines: -1
|
|
|
|
statements: 50
|
|
|
|
misspell:
|
|
|
|
locale: US
|
|
|
|
ignore-words:
|
|
|
|
- internetbs
|
|
|
|
depguard:
|
2023-06-02 16:35:17 +02:00
|
|
|
rules:
|
|
|
|
main:
|
|
|
|
deny:
|
|
|
|
- pkg: "github.com/instana/testify"
|
|
|
|
desc: not allowed
|
|
|
|
- pkg: "github.com/pkg/errors"
|
|
|
|
desc: Should be replaced by standard lib errors package
|
|
|
|
tagalign:
|
|
|
|
align: false
|
|
|
|
order:
|
|
|
|
- xml
|
|
|
|
- json
|
|
|
|
- yaml
|
|
|
|
- yml
|
|
|
|
- toml
|
|
|
|
- mapstructure
|
|
|
|
- url
|
2023-02-28 10:08:15 +02:00
|
|
|
godox:
|
|
|
|
keywords:
|
|
|
|
- FIXME
|
|
|
|
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
|
|
|
|
- appendAssign
|
|
|
|
- ruleguard
|
|
|
|
- httpNoBody
|
|
|
|
- exposedSyncMutex
|
2023-05-05 09:51:42 +02:00
|
|
|
revive:
|
|
|
|
rules:
|
|
|
|
- name: struct-tag
|
|
|
|
- name: blank-imports
|
|
|
|
- name: context-as-argument
|
|
|
|
- name: context-keys-type
|
|
|
|
- name: dot-imports
|
|
|
|
- name: error-return
|
|
|
|
- name: error-strings
|
|
|
|
- name: error-naming
|
|
|
|
- name: exported
|
|
|
|
disabled: true
|
|
|
|
- name: if-return
|
|
|
|
- name: increment-decrement
|
|
|
|
- name: var-naming
|
|
|
|
- name: var-declaration
|
|
|
|
- name: package-comments
|
|
|
|
disabled: true
|
|
|
|
- name: range
|
|
|
|
- name: receiver-naming
|
|
|
|
- name: time-naming
|
|
|
|
- name: unexported-return
|
|
|
|
- name: indent-error-flow
|
|
|
|
- name: errorf
|
|
|
|
- name: empty-block
|
|
|
|
- name: superfluous-else
|
|
|
|
- name: unused-parameter
|
|
|
|
disabled: true
|
|
|
|
- name: unreachable-code
|
|
|
|
- name: redefines-builtin-id
|
2023-10-31 15:08:50 +02:00
|
|
|
testifylint:
|
2024-02-08 04:16:48 +02:00
|
|
|
disable:
|
|
|
|
- require-error
|
|
|
|
- go-require
|
2024-04-16 23:10:59 +02:00
|
|
|
perfsprint:
|
|
|
|
err-error: true
|
|
|
|
errorf: true
|
|
|
|
sprintf1: true
|
|
|
|
strconcat: false
|
2023-02-28 10:08:15 +02:00
|
|
|
|
2024-10-14 13:14:05 +02:00
|
|
|
run:
|
|
|
|
timeout: 10m
|
|
|
|
|
|
|
|
output:
|
|
|
|
show-stats: true
|
|
|
|
sort-results: true
|
|
|
|
sort-order:
|
|
|
|
- linter
|
|
|
|
- file
|
2023-02-28 10:08:15 +02:00
|
|
|
|
|
|
|
issues:
|
2024-10-14 13:14:05 +02:00
|
|
|
exclude-generated: strict
|
2023-02-28 10:08:15 +02:00
|
|
|
exclude-use-default: false
|
2024-02-08 04:16:48 +02:00
|
|
|
max-issues-per-linter: 0
|
2023-02-28 10:08:15 +02:00
|
|
|
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'
|
|
|
|
exclude-rules:
|
|
|
|
- path: (.+)_test.go
|
|
|
|
linters:
|
|
|
|
- funlen
|
|
|
|
- goconst
|
|
|
|
- maintidx
|
2024-05-27 13:04:32 +02:00
|
|
|
- path: (.+)_test.go
|
|
|
|
text: 'Error return value of `fmt.Fprintln` is not checked'
|
|
|
|
linters:
|
|
|
|
- errcheck
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: providers/dns/dns_providers.go
|
|
|
|
linters:
|
|
|
|
- gocyclo
|
|
|
|
- path: certcrypto/crypto.go
|
|
|
|
text: '(tlsFeatureExtensionOID|ocspMustStapleFeature) is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: challenge/dns01/nameserver.go
|
|
|
|
text: '(defaultNameservers|recursiveNameservers|fqdnSoaCache|muFqdnSoaCache) is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: challenge/dns01/nameserver_.+.go
|
|
|
|
text: 'dnsTimeout is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: challenge/dns01/nameserver_test.go
|
|
|
|
text: 'findXByFqdnTestCases is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: challenge/http01/domain_matcher.go
|
|
|
|
text: 'string `Host` has \d occurrences, make it a constant'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- goconst
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: challenge/http01/domain_matcher.go
|
|
|
|
text: 'cyclomatic complexity \d+ of func `parseForwardedHeader` is high'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gocyclo
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: challenge/http01/domain_matcher.go
|
|
|
|
text: "Function 'parseForwardedHeader' has too many statements"
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- funlen
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: challenge/tlsalpn01/tls_alpn_challenge.go
|
|
|
|
text: 'idPeAcmeIdentifierV1 is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: log/logger.go
|
|
|
|
text: 'Logger is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: 'e2e/(dnschallenge/)?[\d\w]+_test.go'
|
|
|
|
text: load is a global variable
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: 'providers/dns/([\d\w]+/)*[\d\w]+_test.go'
|
|
|
|
text: 'envTest is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-07-27 12:42:48 +02:00
|
|
|
- path: 'providers/http/([\d\w]+/)*[\d\w]+_test.go'
|
|
|
|
text: 'envTest is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: providers/dns/namecheap/namecheap_test.go
|
|
|
|
text: 'testCases is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: providers/dns/acmedns/acmedns_test.go
|
|
|
|
text: 'egTestAccount is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: providers/http/memcached/memcached_test.go
|
|
|
|
text: 'memcachedHosts is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: cmd/zz_gen_cmd_dnshelp.go
|
|
|
|
linters:
|
|
|
|
- gocyclo
|
|
|
|
- funlen
|
2023-05-05 09:49:38 +02:00
|
|
|
- path: providers/dns/checkdomain/internal/types.go
|
2023-02-28 10:08:15 +02:00
|
|
|
text: '`payed` is a misspelling of `paid`'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- misspell
|
2023-02-28 10:08:15 +02:00
|
|
|
- path: platform/tester/env_test.go
|
|
|
|
linters:
|
|
|
|
- thelper
|
|
|
|
- path: providers/dns/oraclecloud/oraclecloud_test.go
|
|
|
|
text: 'SA1019: x509.EncryptPEMBlock has been deprecated since Go 1.16'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- staticcheck
|
2023-05-05 09:49:38 +02:00
|
|
|
- path: providers/dns/sakuracloud/wrapper.go
|
2023-02-28 10:08:15 +02:00
|
|
|
text: 'mu is a global variable'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gochecknoglobals
|
2023-05-27 17:05:22 +02:00
|
|
|
- path: cmd/cmd_renew.go
|
2024-04-16 23:10:59 +02:00
|
|
|
text: 'cyclomatic complexity \d+ of func `(renewForDomains|renewForCSR)` is high'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gocyclo
|
2024-12-03 15:03:49 +02:00
|
|
|
- path: cmd/cmd_renew.go
|
|
|
|
text: "Function 'renewForDomains' has too many statements"
|
|
|
|
linters:
|
|
|
|
- funlen
|
2024-02-04 20:43:54 +02:00
|
|
|
- path: providers/dns/cpanel/cpanel.go
|
|
|
|
text: 'cyclomatic complexity 13 of func `\(\*DNSProvider\)\.CleanUp` is high'
|
2024-10-14 13:14:05 +02:00
|
|
|
linters:
|
|
|
|
- gocyclo
|
2024-11-11 12:23:37 +02:00
|
|
|
- path: providers/dns/servercow/internal/types.go
|
|
|
|
text: 'the methods of "Value" use pointer receiver and non-pointer receiver.'
|
|
|
|
linters:
|
|
|
|
- recvcheck
|
2024-05-09 21:31:20 +02:00
|
|
|
|
2024-09-14 14:26:25 +02:00
|
|
|
# Those elements have been replaced by non-exposed structures.
|
|
|
|
- path: providers/dns/linode/linode_test.go
|
|
|
|
linters:
|
|
|
|
- staticcheck
|
|
|
|
text: "SA1019: linodego\\.(DomainsPagedResponse|DomainRecordsPagedResponse) is deprecated"
|