You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helm/.golangci.yml

67 lines
1.7 KiB

version: "2"
linters:
default: none
enable:
- dupl
- govet
- ineffassign
- misspell
- nakedret
- revive
- staticcheck
- unused
settings:
dupl:
threshold: 400
staticcheck:
checks:
- "all"
- "-QF1008" # QF1008: could remove embedded field "Foo" from selector
- "-QF1001" # QF1001: could apply De Morgan's law
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
# Helm, and the Go source code itself, sometimes uses these names outside their built-in
# functions. As the Go source code has re-used these names it's ok for Helm to do the same.
# Linting will look for redefinition of built-in id's but we opt-in to the ones we choose to use.
- linters:
- revive
text: 'redefines-builtin-id: redefinition of the built-in function append'
- linters:
- revive
text: 'redefines-builtin-id: redefinition of the built-in function clear'
- linters:
- revive
text: 'redefines-builtin-id: redefinition of the built-in function max'
- linters:
- revive
text: 'redefines-builtin-id: redefinition of the built-in function min'
- linters:
- revive
text: 'redefines-builtin-id: redefinition of the built-in function new'
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: true
goimports:
local-prefixes:
- helm.sh/helm/v3
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$