version: "2"
linters:
  default: none
  exclusions:
    generated: lax
    presets: [ comments, common-false-positives, legacy, std-error-handling ]
    paths: [ third_party, builtin$, examples$ ]
    warn-unused: true
  settings:
    staticcheck:
      checks: [ "all", "-ST1000", "-ST1001", "-ST1003", "-ST1005", "-ST1012", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-QF1001", "-QF1003", "-QF1008" ]
  enable:
    - asasalint
    - asciicheck
    - bidichk
    - bodyclose
    - canonicalheader
    - contextcheck
    - copyloopvar
    - decorder
    - dogsled
    - dupword
    - durationcheck
    - errcheck
    - errchkjson
    - errname
    - exhaustive
    - exptostd
    - forbidigo
    - ginkgolinter
    - gocheckcompilerdirectives
    - gochecksumtype
    - gocritic
    - goheader
    - goprintffuncname
    - gosec
    - gosmopolitan
    - govet
    - grouper
    - importas
    - ineffassign
    - interfacebloat
    - intrange
    - loggercheck
    - makezero
    - mirror
    - misspell
    - musttag
    - nakedret
    - nilerr
    - nilnil
    - noctx
    - nosprintfhostport
    - predeclared
    - promlinter
    - protogetter
    - reassign
    - sloglint
    - staticcheck
    - tagalign
    - testableexamples
    - unconvert
    - unparam
    - unused
    - usestdlibvars
    - usetesting
    - wastedassign
formatters:
  enable: [ gci, gofmt ]
  settings:
    gci:
      sections:
        - standard # Standard section: captures all standard packages.
        - default # Default section: contains all imports that could not be matched to another section type.
        - prefix({{REPO-NAME}}) # Custom section: groups all imports with the specified Prefix.
        - blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
        - dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
  exclusions:
    generated: lax
    paths: [ third_party, builtin$, examples$ ]
