.golangci.yml raw
1 version: "2"
2
3 formatters:
4 enable:
5 - gci
6 - gofumpt
7 settings:
8 gofumpt:
9 extra-rules: true
10
11 linters:
12 default: all
13 disable:
14 - cyclop # duplicate of gocyclo
15 - dupl
16 - err113
17 - errname # Require a breaking change.
18 - exhaustive
19 - exhaustruct
20 - forcetypeassert
21 - lll
22 - mnd
23 - nlreturn
24 - noctx
25 - paralleltest
26 - prealloc
27 - rowserrcheck # not relevant (SQL)
28 - sqlclosecheck # not relevant (SQL)
29 - testpackage
30 - tparallel
31 - wrapcheck
32 - noinlineerr
33 - wsl # deprecated
34
35 settings:
36 depguard:
37 rules:
38 main:
39 deny:
40 - pkg: github.com/instana/testify
41 desc: not allowed
42 - pkg: github.com/pkg/errors
43 desc: Should be replaced by standard lib errors package
44 funlen:
45 lines: -1
46 statements: 40
47 goconst:
48 min-len: 5
49 min-occurrences: 3
50 gocritic:
51 disabled-checks:
52 - sloppyReassign
53 - rangeValCopy
54 - octalLiteral
55 - paramTypeCombine # already handle by gofumpt.extra-rules
56 enabled-tags:
57 - diagnostic
58 - style
59 - performance
60 settings:
61 hugeParam:
62 sizeThreshold: 100
63 gocyclo:
64 min-complexity: 15
65 godox:
66 keywords:
67 - FIXME
68 govet:
69 disable:
70 - fieldalignment
71 enable-all: true
72 misspell:
73 locale: US
74
75 exclusions:
76 warn-unused: true
77 presets:
78 - comments
79 rules:
80 - linters:
81 - bodyclose
82 - funlen
83 path: .*_test.go
84
85 issues:
86 max-issues-per-linter: 0
87 max-same-issues: 0
88