version: "2"
run:
  concurrency: 4
  timeout: 20m
  build-tags:
  - integ
  - integfuzz
linters:
  default: none
  enable:
  - asciicheck
  - copyloopvar
  - errcheck
  - gocritic
  - gosec
  - govet
  - ineffassign
  - lll
  - makezero
  - misspell
  - prealloc
  - predeclared
  - revive
  - staticcheck
  - unconvert
  - unparam
  - unused
  settings:
    errcheck:
      check-type-assertions: false
      check-blank: false
    gocritic:
      disabled-checks:
      - exitAfterDefer
    gosec:
      excludes:
      - G401
      - G402
      - G404
      - G501
      - G115
      severity: low
      confidence: low
    govet:
      disable:
      - shadow
    lll:
      line-length: 160
      tab-width: 1
    misspell:
      locale: US
      ignore-rules:
      - cancelled
      - marshalled
    unparam:
      check-exported: false
  exclusions:
    generated: lax
    presets:
    - comments
    - common-false-positives
    - legacy
    - std-error-handling
    rules:
    - linters:
      - errcheck
      - maligned
      path: _test\.go$|^tests/|^samples/
    - linters:
      - revive
      - staticcheck
      text: use underscores in Go names
    - linters:
      - revive
      text: unused-parameter
    - linters:
      - revive
      text: "avoid meaningless package names"
    - linters:
      - unparam
      text: is always false
    paths:
    - .*\.pb\.go
    - .*\.gen\.go
    - genfiles$
    - vendor$
    - bin$
    - third_party$
    - builtin$
    - examples$
formatters:
  enable:
  - gci
  - gofumpt
  - goimports
  settings:
    gci:
      sections:
      - standard
      - default
      - prefix(github.com/fatedier/frp/)
  exclusions:
    generated: lax
    paths:
    - .*\.pb\.go
    - .*\.gen\.go
    - genfiles$
    - vendor$
    - bin$
    - third_party$
    - builtin$
    - examples$
issues:
  max-issues-per-linter: 0
  max-same-issues: 0
