run:
  timeout: 5m
  skip-files:
    - 'client_prod_test.go'

linters-settings:
  govet:
    enable-all: true
    disable:
      - fieldalignment
  gocyclo:
    min-complexity: 15
  maligned:
    suggest-new: true
  goconst:
    min-len: 5
    min-occurrences: 3
  misspell:
    locale: US
  funlen:
    lines: -1
    statements: 50
  godox:
    keywords:
      - FIXME
  gofumpt:
    extra-rules: true
  depguard:
    rules:
      main:
        deny:
          - pkg: "github.com/instana/testify"
            desc: not allowed
          - pkg: "github.com/pkg/errors"
            desc: Should be replaced by standard lib errors package
  gocritic:
    enabled-tags:
      - diagnostic
      - style
      - performance
    disabled-checks:
      - sloppyReassign
      - rangeValCopy
      - octalLiteral
      - hugeParam
      - paramTypeCombine # already handled by gofumpt.extra-rules
  tagliatelle:
    case:
      rules:
        json: snake

linters:
  enable-all: true
  disable:
    - deadcode # deprecated
    - exhaustivestruct # deprecated
    - golint # deprecated
    - ifshort # deprecated
    - interfacer # deprecated
    - maligned # deprecated
    - nosnakecase # deprecated
    - scopelint # deprecated
    - structcheck # deprecated
    - varcheck # deprecated
    - sqlclosecheck # not relevant (SQL)
    - rowserrcheck # not relevant (SQL)
    - execinquery # not relevant (SQL)
    - cyclop # duplicate of gocyclo
    - lll
    - dupl
    - wsl
    - nlreturn
    - gomnd
    - goerr113
    - wrapcheck
    - exhaustive
    - exhaustruct
    - testpackage
    - tparallel
    - paralleltest
    - prealloc
    - ifshort
    - forcetypeassert
    - bodyclose # Too many false positives: https://github.com/timakin/bodyclose/issues/30
    - varnamelen

issues:
  exclude-use-default: false
  max-issues-per-linter: 0
  max-same-issues: 0
  exclude:
    - 'ST1000: at least one file in a package should have a package comment'
    - 'fmt.Sprintf can be replaced with string addition'
  exclude-rules:
    - path: .*_test.go
      linters:
        - funlen
