formatters: enable: - gofmt - goimports exclusions: generated: lax settings: gofmt: simplify: true goimports: local-prefixes: - helm.sh/helm/v4 linters: default: none # Keep sorted alphabetically enable: - bidichk - contextcheck - depguard - dupl - errorlint - exhaustive - fatcontext - gocritic - gomodguard - 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: false # Check for plain error comparisons. comparison: false exhaustive: default-signifies-exhaustive: true gocritic: disabled-checks: - appendAssign - appendCombine - assignOp - badCall - commentedOutCode - commentFormatting - deferInLoop - elseif - exposedSyncMutex - filepathJoin - hugeParam - ifElseChain - importShadow - nilValReturn - paramTypeCombine - ptrToRefParam - rangeValCopy - todoCommentWithoutDetail - tooManyResultsChecker - uncheckedInlineErr - unnamedResult - whyNoLint enable-all: true gomodguard: blocked: modules: - 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: 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"