linters-settings:
  dupl:
    threshold: 100
  funlen:
    lines: 100
    statements: 50
  goconst:
    min-len: 2
    min-occurrences: 3
  gocritic:
    enabled-tags:
      - diagnostic
      - experimental
      - opinionated
      - performance
      - style
    disabled-checks:
      - whyNoLint
  gocyclo:
    min-complexity: 15
  goimports:
    local-prefixes: github.com/timonwong/loggercheck
  mnd:
    # don't include the "operation" and "assign"
    checks:
      - argument
      - case
      - condition
      - return
    ignored-numbers:
      - '0'
      - '1'
      - '2'
      - '3'
    ignored-functions:
      - strings.SplitN
      - strconv.ParseInt
  govet:
    shadow: true
  lll:
    line-length: 140
  misspell:
    locale: US
  nolintlint:
    allow-unused: false # report any unused nolint directives
    require-explanation: false # don't require an explanation for nolint directives
    require-specific: false # don't require nolint directives to be specific about which linter is being skipped
linters:
  disable-all: true
  enable:
    - bodyclose
    - dogsled
    - dupl
    - errcheck
    - copyloopvar
    - funlen
    - gochecknoinits
    - goconst
    - gocritic
    - gocyclo
    - gofumpt
    - goimports
    - mnd
    - goprintffuncname
    - gosec
    - gosimple
    - govet
    - ineffassign
    - lll
    - misspell
    - nakedret
    - noctx
    - nolintlint
    - revive
    - staticcheck
    - stylecheck
    - typecheck
    - unconvert
    - unparam
    - unused
    - whitespace

issues:
  # Excluding configuration per-path, per-linter, per-text and per-source
  exclude-rules:
    - path: _test\.go
      linters:
        - mnd
  exclude-dirs:
    - testdata

run:
  timeout: 5m
  go: '1.23'