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
    - forcetypeassert
    - funcorder
    - ginkgolinter
    - gocheckcompilerdirectives
    - gochecksumtype
    - gocognit
    - goconst
    - gocritic
    - gocyclo
    - godoclint
    - godot
    - godox
    - goheader
    - gomoddirectives
    - gomodguard
    - 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
    # - forbidigo
    # - funlen
    # - gochecknoglobals
    # - gochecknoinits
    # - gosec
    # - ireturn
    # - lll
    # - mnd
    # - nilnil
    # - noinlineerr
    # - nonamedreturns
    # - testpackage
    # - varnamelen
    # - wrapcheck
  settings:
    wsl_v5:
      allow-first-in-block: true
      allow-whole-block: false
      branch-max-lines: 2
    cyclop:
      max-complexity: 37
    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
    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$
