version: "2"
linters:
  enable:
    - bodyclose
    - depguard
    - dogsled
    - errorlint
    - gocritic
    - gocyclo
    - goprintffuncname
    - gosec
    - misspell
    - noctx
    - nolintlint
    - prealloc
    - rowserrcheck
    - staticcheck
    - unconvert
    - unparam
    - whitespace
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    paths:
      - third_party$
      - builtin$
      - examples$
  settings:
    depguard:
      rules:
        main:
          list-mode: lax
          files:
            - $all
          allow:
            - $gostd
            - github.com/rjNemo/underscore
            - github.com/rjNemo/underscore/...
            - github.com/stretchr/testify/...
            - golang.org/x/exp/constraints
formatters:
  enable:
    - gofmt
    - goimports
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
