version: "2"
run:
  tests: false
linters:
  default: none
  enable:
    - asciicheck
    - bodyclose
    - copyloopvar
    - dogsled
    - errcheck
    - gochecknoinits
    - goconst
    - gocritic
    - gomodguard
    - gosec
    - govet
    - ineffassign
    - misspell
    - nakedret
    - noctx
    - revive
    - staticcheck
    - unconvert
    - unparam
    - unused
    - whitespace
  settings:
    goconst:
      min-len: 5
      min-occurrences: 4
    misspell:
      locale: US
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    paths:
      - .*\.pb\.go$
      - .*\.pb\.gw\.go$
      - .*\.gen\.go$
      - _test\.go$
      - testing.go$
      - .*doc\.go$
      - third_party$
      - builtin$
      - examples$
formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
    - goimports
  settings:
    gci:
      sections:
        - standard
        - default
        - prefix(berty.tech)
  exclusions:
    generated: lax
    paths:
      - .*\.pb\.go$
      - .*\.pb\.gw\.go$
      - .*\.gen\.go$
      - _test\.go$
      - testing.go$
      - .*doc\.go$
      - third_party$
      - builtin$
      - examples$
