version: "2"
run:
  go: "1.26"

  # timeout for analysis
  timeout: 6m

linters:
  default: all
  disable:
    - containedctx
    - contextcheck
    - cyclop
    - depguard
    - dogsled
    - err113
    - errname
    - errorlint
    - exhaustive
    - exhaustruct
    - forcetypeassert
    - funlen
    - gochecknoglobals
    - gochecknoinits
    - gocognit
    - gocyclo
    - godox
    - gomoddirectives
    - inamedparam
    - interfacebloat
    - intrange
    - ireturn
    - maintidx
    - mnd
    - nestif
    - nilerr
    - nilnil
    - nlreturn
    - noctx
    - nolintlint
    - paralleltest
    - perfsprint
    - prealloc
    - protogetter
    - revive
    - tagalign
    - testifylint
    - testpackage
    - thelper
    - tparallel
    - varnamelen
    - wrapcheck
    - wsl
    - funcorder
    - wsl_v5
    - noinlineerr
  settings:
    staticcheck:
      checks:
        - all
        - -QF*
        - -ST*
    gosec:
      excludes:
        - G402
        - G306
        - G115
    tagliatelle:
      case:
        rules:
          json: snake
    whitespace:
      multi-if: true
      multi-func: true
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    rules:
      - linters:
          - forbidigo
          - gosec
          - unparam
        path: _test\.go
      - linters:
          - gosec
        path: _mock\.go
      - linters:
          - errcheck
          - forbidigo
        path: cmd/loopd/*
      - linters:
          - forbidigo
        path: loopd/*
      - linters:
          - errcheck
          - forbidigo
        path: cmd/loop/*
      - linters:
          - forbidigo
        path: fsm/stateparser/*
      - linters:
          - lll
        path: loopd/config.go
      - linters:
          - lll
        path: loopdb/*
    paths:
      - \.pb\.go$
      - \.pb\.gw\.go$
      - third_party$
      - builtin$
      - examples$
issues:
  new-from-rev: 36838cf7f464cf73b0201798063b2caffeae4250
formatters:
  enable:
    - gofmt
    - goimports
  settings:
    gofmt:
      simplify: true
  exclusions:
    generated: lax
    paths:
      - \.pb\.go$
      - \.pb\.gw\.go$
      - third_party$
      - builtin$
      - examples$
