version: "2"
linters:
  default: none
  enable:
    - dogsled
    - errcheck
    - goconst
    - gocritic
    - gosec
    - govet
    - ineffassign
    - misspell
    - nakedret
    - revive
    - unconvert
    - whitespace
  settings:
    dupl:
      threshold: 120
    goconst:
      min-len: 2
      min-occurrences: 3
    gocritic:
      disabled-checks:
        - hugeParam
        - rangeValCopy
        - exitAfterDefer
        - whyNoLint
        - singleCaseSwitch
        - commentedOutCode
        - appendAssign
        - unnecessaryBlock
        - redundantSprint
      enabled-tags:
        - diagnostic
        - experimental
        - opinionated
        - performance
        - style
    gocyclo:
      min-complexity: 15
    lll:
      line-length: 140
    misspell:
      locale: US
    revive:
      rules:
        - name: unused-parameter
          disabled: true
  exclusions:
    generated: lax
    rules:
      - linters:
          - dupl
          - errcheck
          - funlen
          - gocognit
          - goconst
          - gocyclo
          - gosec
          - lll
          - scopelint
        path: _test\.go
      - linters:
          - gocritic
        path: _test\.go
        text: Combine
      - linters:
          - gocritic
        path: _test\.go
        text: dupArg
        source: (assert|require).+Equal
      - linters:
          - govet
        text: declaration of "(err|ctx|log|c)"
      - linters:
          - funlen
          - gocognit
          - goconst
          - gocyclo
        path: main\.go
      - linters:
          - gosec
        text: G115
    paths:
      - third_party$
      - builtin$
      - examples$
formatters:
  enable:
    - gofmt
    - goimports
  settings:
    goimports:
      local-prefixes:
        - github.com/go-faster/
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
