version: "2"
linters:
  default: all
  disable:
    - copyloopvar
    - cyclop
    - depguard
    - dupl
    - err113
    - errname
    - errorlint
    - exhaustive
    - exhaustruct
    - forbidigo
    - forcetypeassert
    - funcorder
    - funlen
    - gochecknoglobals
    - gocognit
    - goconst
    - gocyclo
    - godox
    - gosec
    - gosmopolitan
    - inamedparam
    - intrange
    - ireturn
    - maintidx
    - mnd
    - nakedret
    - nestif
    - nlreturn
    - noctx
    - nonamedreturns
    - paralleltest
    - testableexamples
    - testpackage
    - thelper
    - tparallel
    - unparam
    - usestdlibvars
    - varnamelen
    - wrapcheck
    - wsl
  settings:
    gocritic:
      disabled-checks:
        - deferInLoop
        - importShadow
        - sloppyReassign
        - unnamedResult
        - whyNoLint
      enabled-tags:
        - diagnostic
        - experimental
        - opinionated
        - performance
        - style
    govet:
      disable:
        - fieldalignment
        - shadow
      enable-all: true
    lll:
      line-length: 130
    revive:
      rules:
        - name: indent-error-flow
        - name: use-any
    staticcheck:
      checks:
        - -ST1000
        - all
  exclusions:
    generated: lax
    presets:
      - common-false-positives
      - legacy
      - std-error-handling
    rules:
      - linters:
          - lll
        path: _test\.go
    paths:
      - third_party$
      - builtin$
      - examples$
issues:
  max-issues-per-linter: 0
  max-same-issues: 0
formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
    - goimports
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
