version: "2"
linters:
  enable:
    - asciicheck
    - depguard
    - errorlint
    - gochecknoinits
    - gosec
    - misspell
    - nakedret
    - nolintlint
    - predeclared
    - revive
    - unconvert
    - unparam
  settings:
    misspell:
      locale: UK
      ignore-rules:
        - color
        - colors
    depguard:
      rules:
        prevent_unmaintained_packages:
          list-mode: lax
          files:
            - $all
            - '!$test'
          deny:
            - pkg: io/ioutil
              desc: 'replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil'
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    rules:
      - linters:
          - revive
        text: var-naming
    paths:
      - third_party$
      - builtin$
      - examples$
formatters:
  enable:
    - gci
    - gofmt
    - goimports
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
