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