1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-15 17:51:01 +00:00
external-secrets/.golangci.yaml
Shuhei Kitagawa 43a7a16baf
Update Go and golangci-lint version (#3396)
Signed-off-by: shuheiktgw <s-kitagawa@mercari.com>
Co-authored-by: Gustavo Fernandes de Carvalho <gusfcarvalho@gmail.com>
2024-04-25 06:36:11 -03:00

127 lines
2.9 KiB
YAML

run:
timeout: 10m
linters-settings:
gci:
sections:
- "standard"
- "default"
- "prefix(github.com/external-secrets/external-secrets)"
- "blank"
- "dot"
goconst:
min-len: 3
min-occurrences: 3
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
- importShadow
- unnamedResult
- unnecessaryBlock
settings:
rangeValCopy:
sizeThreshold: 512
hugeParam:
sizeThreshold: 512
gocyclo:
min-complexity: 16
goheader:
template-path: ./hack/boilerplate.go.txt
dupl:
threshold: 200
govet:
check-shadowing: false
lll:
line-length: 300
misspell:
locale: US
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- dogsled
- dupl
- errcheck
- errorlint
- exhaustive
- exportloopref
- gci
- goheader
- goconst
- gocritic
- godot
- gofmt
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- nolintlint
- prealloc
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
issues:
# Excluding configuration per-path and per-linter
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test(ing)?\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- unparam
- lll
# Ease some gocritic warnings on test files.
- path: _test\.go
text: "(unnamedResult|exitAfterDefer)"
linters:
- gocritic
# This is a "potential hardcoded credentials" warning. It's triggered by
# any variable with 'secret' in the same, and thus hits a lot of false
# positives in Kubernetes land where a Secret is an object type.
- text: "G101:"
linters:
- gosec
# The header check doesn't correctly parse the header as a code comment and is
# triggered by the perceived diff. The header check still correctly detects missing
# license headers and is useful for some cases.
- text: "Actual:"
linters:
- goheader
# excluding deprecation check introduced on purpose in #2884
- path: pkg/provider/fake/fake.go
text: 'SA1019: data.ValueMap is deprecated: ValueMap is deprecated and is intended to be removed in the future, use the `value` field instead.'
- path: pkg/provider/fake/fake_test.go
text: 'SA1019: data.ValueMap is deprecated: ValueMap is deprecated and is intended to be removed in the future, use the `value` field instead.'
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0