Merge pull request #30786 from mmorel-35/clean-up

refactor: reorganize .golangci.yml for better clarity and structure
pull/30800/head
Matt Farina 5 months ago committed by GitHub
commit ab15810701
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,8 +1,22 @@
version: "2" formatters:
run: enable:
timeout: 10m - gofmt
- goimports
exclusions:
generated: lax
settings:
gofmt:
simplify: true
goimports:
local-prefixes:
- helm.sh/helm/v4
linters: linters:
default: none default: none
enable: enable:
- depguard - depguard
- dupl - dupl
@ -13,60 +27,37 @@ linters:
- revive - revive
- staticcheck - staticcheck
- unused - unused
settings:
depguard:
rules:
Main:
deny:
- pkg: github.com/hashicorp/go-multierror
desc: "use errors instead"
- pkg: github.com/pkg/errors
desc: "use errors instead"
dupl:
threshold: 400
exclusions: exclusions:
# Helm, and the Go source code itself, sometimes uses these names outside their built-in # 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. # 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. # Linting will look for redefinition of built-in id's but we opt-in to the ones we choose to use.
generated: lax generated: lax
presets: presets:
- comments - comments
- common-false-positives - common-false-positives
- legacy - legacy
- std-error-handling - std-error-handling
rules:
- linters: rules: []
- revive
text: 'redefines-builtin-id: redefinition of the built-in function append' warn-unused: true
- 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: settings:
gofmt: depguard:
simplify: true rules:
goimports: Main:
local-prefixes: deny:
- helm.sh/helm/v4 - pkg: github.com/hashicorp/go-multierror
exclusions: desc: "use errors instead"
generated: lax - pkg: github.com/pkg/errors
paths: desc: "use errors instead"
- third_party$
- builtin$ dupl:
- examples$ threshold: 400
run:
timeout: 10m
version: "2"

Loading…
Cancel
Save