version: "2"
linters:
  default: none
  enable:
    - bodyclose
    - copyloopvar
    - depguard
    - dogsled
    - errcheck
    - forbidigo
    - funlen
    - goconst
    - gocyclo
    - gosec
    - govet
    - ineffassign
    - misspell
    - nakedret
    - staticcheck
    - unconvert
    - unparam
    - unused
    - whitespace
  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
    goconst:
      min-occurrences: 4
    gosec:
      excludes:
        - G115
    govet:
      disable:
        - fieldalignment
      enable-all: true
    nestif:
      min-complexity: 6
    staticcheck:
      checks:
        # Don't bother omitting embedded fields from selector expressions
        # https://staticcheck.dev/docs/checks/#QF1008
        - -QF1008
  exclusions:
    generated: lax
issues:
  max-issues-per-linter: 0
  max-same-issues: 0
formatters:
  enable:
    - gofmt
    - gofumpt
    - goimports
