| version: "2" |
| run: |
| concurrency: 6 |
| linters: |
| default: none |
| enable: |
| - arangolint |
| - asasalint |
| - asciicheck |
| - bidichk |
| - bodyclose |
| - canonicalheader |
| - containedctx |
| - contextcheck |
| - copyloopvar |
| - cyclop |
| - decorder |
| - dogsled |
| - dupl |
| - dupword |
| - durationcheck |
| - embeddedstructfieldcheck |
| - errcheck |
| - errchkjson |
| - errname |
| - errorlint |
| - exhaustive |
| - exptostd |
| - fatcontext |
| - forbidigo |
| - forcetypeassert |
| - funcorder |
| - ginkgolinter |
| - gocheckcompilerdirectives |
| - gochecksumtype |
| - gocognit |
| - goconst |
| - gocritic |
| - gocyclo |
| - godoclint |
| - godot |
| - godox |
| - goheader |
| - gomoddirectives |
| - gomodguard_v2 |
| - gosec |
| - goprintffuncname |
| - gosmopolitan |
| - govet |
| - grouper |
| - iface |
| - importas |
| - inamedparam |
| - ineffassign |
| - interfacebloat |
| - intrange |
| - iotamixing |
| - loggercheck |
| - maintidx |
| - makezero |
| - mirror |
| - misspell |
| - modernize |
| - musttag |
| - nakedret |
| - nestif |
| - nilerr |
| - nilnesserr |
| - nlreturn |
| - noctx |
| - nolintlint |
| - nosprintfhostport |
| - paralleltest |
| - perfsprint |
| - prealloc |
| - predeclared |
| - promlinter |
| - protogetter |
| - reassign |
| - recvcheck |
| - revive |
| - rowserrcheck |
| - sloglint |
| - spancheck |
| - sqlclosecheck |
| - staticcheck |
| - tagalign |
| - tagliatelle |
| - testableexamples |
| - testifylint |
| - thelper |
| - tparallel |
| - unconvert |
| - unparam |
| - unqueryvet |
| - unused |
| - usestdlibvars |
| - usetesting |
| - wastedassign |
| - whitespace |
| - wsl_v5 |
| - zerologlint |
| # - depguard |
| # - err113 |
| # - exhaustruct |
| # - funlen |
| # - gochecknoglobals |
| # - gochecknoinits |
| # - ireturn |
| # - lll |
| # - mnd |
| # - nilnil |
| # - noinlineerr |
| # - nonamedreturns |
| # - testpackage |
| # - varnamelen |
| # - wrapcheck |
| settings: |
| goconst: |
| min-occurrences: 5 |
| wsl_v5: |
| allow-first-in-block: true |
| allow-whole-block: false |
| branch-max-lines: 2 |
| cyclop: |
| max-complexity: 37 |
| forbidigo: |
| analyze-types: false |
| forbid: |
| - pattern: ^logrus\.Fatal.*$ |
| msg: "use error returns instead of logrus.Fatal*; let main() print and exit with non-zero" |
| - pattern: ^log\.Fatal.*$ |
| msg: "use error returns instead of log.Fatal*; let main() print and exit with non-zero" |
| - pattern: ^klog\.Fatal.*$ |
| msg: "use error returns instead of klog.Fatal*; let main() print and exit with non-zero" |
| - pattern: ^os\.Exit.*$ |
| msg: "use error returns instead of os.Exit; let main() handle the exit" |
| gocognit: |
| min-complexity: 71 |
| gocritic: |
| enable-all: true |
| gocyclo: |
| min-complexity: 35 |
| godox: |
| keywords: |
| - BUG |
| - FIXME |
| - HACK |
| maintidx: |
| under: 10 |
| nestif: |
| min-complexity: 17 |
| revive: |
| rules: |
| - name: dot-imports |
| disabled: true |
| staticcheck: |
| dot-import-whitelist: |
| - github.com/onsi/ginkgo/v2 |
| - github.com/onsi/gomega |
| - github.com/onsi/gomega/gbytes |
| - github.com/onsi/gomega/gexec |
| checks: |
| - -ST1001 |
| - SA1019 |
| - all |
| exclusions: |
| generated: lax |
| presets: |
| - comments |
| - common-false-positives |
| - legacy |
| - std-error-handling |
| rules: |
| # TODO: clean up these exceptions and remove them from the config |
| - linters: |
| - goconst |
| path: cmd/crictl/ |
| - linters: |
| - goconst |
| path: _test\.go$ |
| - linters: |
| - goconst |
| path: pkg/validate/ |
| - linters: |
| - forbidigo |
| path: _test\.go$ |
| paths: |
| - third_party$ |
| - builtin$ |
| - examples$ |
| formatters: |
| enable: |
| - gci |
| - gofmt |
| - gofumpt |
| - goimports |
| settings: |
| gci: |
| sections: |
| - standard |
| - default |
| - localmodule |
| goimports: |
| local-prefixes: |
| - sigs.k8s.io/cri-tools |
| exclusions: |
| generated: lax |
| paths: |
| - third_party$ |
| - builtin$ |
| - examples$ |