formatters: enable: - gofmt - gofumpt - goimports exclusions: generated: lax settings: gofmt: simplify: true gofumpt: module-path: helm.sh/helm/v4 extra-rules: false goimports: local-prefixes: - helm.sh/helm/v4 linters: default: none # Keep sorted alphabetically enable: - bidichk - contextcheck - depguard - dupl - errorlint - exhaustive - fatcontext - gocritic - gomodguard_v2 - govet - ineffassign - misspell - modernize - nakedret - noctx - nolintlint - perfsprint - revive - sloglint - staticcheck - testifylint - thelper - unused - usestdlibvars - usetesting - whitespace exclusions: generated: lax presets: - comments - common-false-positives - legacy - std-error-handling warn-unused: true # Keep sorted alphabetically 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 errorlint: # Check for plain type assertions and type switches. asserts: true # Check for plain error comparisons. comparison: true exhaustive: default-signifies-exhaustive: true gocritic: disabled-checks: - appendAssign - badCall - commentedOutCode - deferInLoop - exposedSyncMutex - hugeParam - importShadow - paramTypeCombine - ptrToRefParam - rangeValCopy - todoCommentWithoutDetail - tooManyResultsChecker - uncheckedInlineErr - unnamedResult - whyNoLint enable-all: true gomodguard_v2: blocked: - module: github.com/evanphx/json-patch recommendations: - github.com/evanphx/json-patch/v5 nolintlint: require-specific: true revive: enable-all-rules: false enable-default-rules: true max-open-files: 2048 rules: - name: early-return arguments: - "preserve-scope" - name: if-return - name: indent-error-flow arguments: - "preserve-scope" - name: superfluous-else arguments: - "preserve-scope" - name: unnecessary-format - name: var-naming arguments: - ["ID"] # AllowList - ["VM"] # DenyList - - skip-initialism-name-checks: true upper-case-const: true skip-package-name-checks: true skip-package-name-collision-with-go-std: true extra-bad-package-names: - helpers - models testifylint: # Intentionally enable all testifylint rules so new checks are adopted automatically. enable-all: true run: timeout: 10m version: "2"