---
linters:
  disable-all: true
  enable:
    # - lll
    # - gocritic
    # - gocognit
    # - gci         (deprecated since v1.30.0)
    # - interfacer  (deprecated since v1.38.0)
    # - scopelint   (deprecated since v1.39.0)
    # - golint      (deprecated since v1.41.0)
    # - structcheck (deprecated since v1.49.0)
    # - varcheck    (deprecated since v1.49.0)
    # - deadcode    (deprecated since v1.49.0)
    # - exportloopref (deprecated since v1.60.2)
    - bodyclose
    - copyloopvar
    - depguard
    - dogsled
    - errcheck
    - forbidigo
    - funlen
    - goconst
    - gocyclo
    - gofmt
    - gofumpt
    - goimports
    - gosec
    - gosimple
    - govet
    - ineffassign
    - misspell
    - nakedret
    - staticcheck
    - stylecheck
    - typecheck
    - unconvert
    - unparam
    - unused
    - whitespace

linters-settings:
  depguard:
    rules:
      main:
        files:
          - $all
        allow:
          - $gostd
          - golang.org/x
          - github.com/bwesterb/go-ristretto
          - github.com/cloudflare/circl
  funlen:
    lines: 120
    statements: 80
  nestif:
    min-complexity: 6
  goconst:
    min-occurrences: 4
  govet:
    enable-all: true
    disable:
      - fieldalignment
  staticcheck:
    # TODO: replace deprecated elliptic.Marshal, elliptic.GenerateKey,
    # elliptic.Unmarshal, params.ScalarBaseMult before re-enabling SA1019.
    checks: ["*", "-SA1019"]
  gosec:
    excludes:
      - G115

issues:
  max-issues-per-linter: 0
  max-same-issues: 0
