run:
  timeout: 5m
  modules-download-mode: readonly

linters:
  # Minimal set targeted at "the code still compiles + is formatted".
  # Larger sets keep catching legacy issues unrelated to this PR
  # (deprecated pubsub usage, tautological comparisons in scheduler
  # helpers, empty branches in event handlers, etc.). Tracking those
  # for a dedicated cleanup pass.
  disable-all: true
  enable:
    - govet
    - typecheck
    - gofmt
    - bodyclose
    - noctx

linters-settings:
  govet:
    # Real-bug subset of govet. shadow + nilness + unusedwrite fire
    # on legacy patterns (idiomatic err re-decl in tx blocks,
    # defensive nil checks the analyzer reads as tautological,
    # struct-builder writes to fields read later). Field-alignment
    # is intentional for readability.
    enable-all: true
    disable:
      - fieldalignment
      - shadow
      - nilness
      - unusedwrite

issues:
  exclude-rules:
    - path: _test\.go
      linters:
        - errcheck
        - gosec
        - unparam

    - path: cmd/
      linters:
        - unparam

  max-issues-per-linter: 50
  max-same-issues: 10
