---
run:
  timeout: 5m

linters:
  enable-all: true
  disable:
    # deprecated
    - varnamelen
    - testpackage
    - containedctx # very strange linter
    - gomnd
    - execinquery
    # meaningfully disabled
    - gochecknoglobals
    - exhaustruct
    - depguard # wtf is this linter
    - tparallel # duplicates paralleltest
    - unused # not very clever lint for generics
    - ireturn # not very clever lint for generics
    - interfacebloat # love big interfaces :)
    - gci # whines about imports too much.

linters-settings:
  cyclop:
    skip-tests: true
    max-complexity: 20
    package-average: 10
  forbidigo:
    forbid:
      - '^(fmt\.Print(|f|ln)|print|println)$'
      - '^time\.Now\(\)($|\.F|\.A|\.B|\.L|\.UTC\(\)\.I|,|\))(# Calls of time\.Now() without \.UTC() is prohibited\.)?'
  funlen:
    ignore-comments: true
    lines: 200
    statements: 60
  gocyclo:
    min-complexity: 20
  gofumpt:
    extra-rules: true
  govet:
    enable-all: true
  lll:
    line-length: 120
  nestif:
    min-complexity: 20
  tagliatelle:
    case:
      use-field-name: true
      rules:
        json: snake
        yaml: camel

issues:
  exclude-use-default: false
  exclude:
    - ST1000 # package comment
    - package-comments
  exclude-rules:
    - path: .+_test\.go
      linters:
        - gosec
    - linters:
        - godox
      text: "TODO"
    # Default error checking pattern "if err := ... ;err != nil {}" multiple times makes go vet to whine.
    - linters:
        - govet
      text: 'declaration of "err" shadows'
  max-issues-per-linter: 0
  max-same-issues: 0
