.golangci.yml raw

   1  linters:
   2    enable-all: true
   3    disable:
   4      - exportloopref # deprecated
   5      - cyclop # duplicate of gocyclo
   6      - lll
   7      - dupl
   8      - wsl
   9      - nlreturn
  10      - mnd
  11      - err113
  12      - wrapcheck
  13      - exhaustive
  14      - exhaustruct
  15      - testpackage
  16      - tparallel
  17      - paralleltest
  18      - prealloc
  19      - forcetypeassert
  20      - bodyclose # Too many false positives: https://github.com/timakin/bodyclose/issues/30
  21      - varnamelen
  22  
  23  linters-settings:
  24    govet:
  25      enable-all: true
  26      disable:
  27        - fieldalignment
  28    gocyclo:
  29      min-complexity: 15
  30    goconst:
  31      min-len: 5
  32      min-occurrences: 3
  33    misspell:
  34      locale: US
  35    funlen:
  36      lines: -1
  37      statements: 50
  38    godox:
  39      keywords:
  40        - FIXME
  41    gofumpt:
  42      extra-rules: true
  43    depguard:
  44      rules:
  45        main:
  46          deny:
  47            - pkg: "github.com/instana/testify"
  48              desc: not allowed
  49            - pkg: "github.com/pkg/errors"
  50              desc: Should be replaced by standard lib errors package
  51    gocritic:
  52      enabled-tags:
  53        - diagnostic
  54        - style
  55        - performance
  56      disabled-checks:
  57        - sloppyReassign
  58        - rangeValCopy
  59        - octalLiteral
  60        - hugeParam
  61        - paramTypeCombine # already handled by gofumpt.extra-rules
  62  
  63  issues:
  64    exclude-use-default: false
  65    max-issues-per-linter: 0
  66    max-same-issues: 0
  67    exclude:
  68      - 'ST1000: at least one file in a package should have a package comment'
  69      - 'fmt.Sprintf can be replaced with string'
  70    exclude-rules:
  71      - path: .*_test.go
  72        linters:
  73          - funlen
  74  
  75  output:
  76    show-stats: true
  77    sort-results: true
  78  
  79  run:
  80    timeout: 5m
  81