version: "2"
linters:
  enable:
    - asasalint
    - asciicheck
    - bidichk
    - canonicalheader
    - containedctx
    - contextcheck
    - copyloopvar
    - cyclop
    - decorder
    - dogsled
    - durationcheck
    - err113
    - errchkjson
    - errname
    - errorlint
    - exhaustive
    - fatcontext
    - ginkgolinter
    - gocheckcompilerdirectives
    - gochecksumtype
    - gocognit
    - goconst
    - gocritic
    - gocyclo
    - godot
    - godox
    - goheader
    - gomoddirectives
    - gomodguard
    - gosmopolitan
    - grouper
    - importas
    - interfacebloat
    - intrange
    - loggercheck
    - makezero
    - mirror
    - misspell
    - musttag
    - nakedret
    - nilerr
    - nilnesserr
    - nilnil
    - nlreturn
    - nolintlint
    - nonamedreturns
    - perfsprint
    - prealloc
    - predeclared
    - promlinter
    - protogetter
    - reassign
    - recvcheck
    - revive
    - rowserrcheck
    - sloglint
    - spancheck
    - sqlclosecheck
    - staticcheck
    - tagalign
    - tagliatelle
    - testifylint
    - unconvert
    - unparam
    - usestdlibvars
    - wastedassign
    - whitespace
    - wrapcheck
    - zerologlint
  settings:
    cyclop:
      max-complexity: 25
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    rules:
      - linters:
          - staticcheck
        path: c2/sslshell/sslshellserver.go
        text: SA1019
      - linters:
          - staticcheck
        path: c2/httpservefile/httpservefile.go
        text: SA1019
      - linters:
          - staticcheck
        path: httphelper.go
        text: SA1019
      - linters:
          - staticcheck
        path: c2/shelltunnel/shelltunnel.go
        text: SA1019
      - linters:
          - staticcheck
        path: cli/commandline_test.go
        text: SA1019
      - linters:
          - gocognit
          - gocyclo
          - cyclop
        path: protocol/sip/helper_test.go
    paths:
      - protocol/mikrotik/msg.go
      - third_party$
      - builtin$
      - examples$
formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
    - goimports
  exclusions:
    generated: lax
    paths:
      - protocol/mikrotik/msg.go
      - third_party$
      - builtin$
      - examples$
