1+ # NOTE: This file is populated by the lint-install tool. Local adjustments may be overwritten.
2+ linters-settings :
3+ cyclop :
4+ # NOTE: This is a very high transitional threshold
5+ max-complexity : 37
6+ package-average : 34.0
7+ skip-tests : true
8+
9+ gocognit :
10+ # NOTE: This is a very high transitional threshold
11+ min-complexity : 98
12+
13+ dupl :
14+ threshold : 200
15+
16+ goconst :
17+ min-len : 4
18+ min-occurrences : 5
19+ ignore-tests : true
20+
21+ errorlint :
22+ # these are still common in Go: for instance, exit errors.
23+ asserts : false
24+
25+ exhaustive :
26+ default-signifies-exhaustive : true
27+
28+ nestif :
29+ min-complexity : 8
30+
31+ nolintlint :
32+ require-explanation : true
33+ allow-unused : false
34+ require-specific : true
35+
36+ revive :
37+ ignore-generated-header : true
38+ severity : warning
39+ rules :
40+ - name : atomic
41+ - name : blank-imports
42+ - name : bool-literal-in-expr
43+ - name : confusing-naming
44+ - name : constant-logical-expr
45+ - name : context-as-argument
46+ - name : context-keys-type
47+ - name : deep-exit
48+ - name : defer
49+ - name : range-val-in-closure
50+ - name : range-val-address
51+ - name : dot-imports
52+ - name : empty-block
53+ - name : error-naming
54+ - name : error-return
55+ - name : error-strings
56+ - name : errorf
57+ - name : exported
58+ - name : identical-branches
59+ - name : if-return
60+ - name : import-shadowing
61+ - name : increment-decrement
62+ - name : indent-error-flow
63+ - name : indent-error-flow
64+ - name : package-comments
65+ - name : range
66+ - name : receiver-naming
67+ - name : redefines-builtin-id
68+ - name : superfluous-else
69+ - name : struct-tag
70+ - name : time-naming
71+ - name : unexported-naming
72+ - name : unexported-return
73+ - name : unnecessary-stmt
74+ - name : unreachable-code
75+ - name : unused-parameter
76+ - name : var-declaration
77+ - name : var-naming
78+ - name : unconditional-recursion
79+ - name : waitgroup-by-value
80+
81+ staticcheck :
82+ go : " 1.16"
83+
84+ unused :
85+ go : " 1.16"
86+
87+ output :
88+ sort-results : true
89+
90+ linters :
91+ disable-all : true
92+ enable :
93+ - asciicheck
94+ - bodyclose
95+ - cyclop
96+ - deadcode
97+ - dogsled
98+ - dupl
99+ - durationcheck
100+ - errcheck
101+ # errname is only available in golangci-lint v1.42.0+ - wait until v1.43 is available to settle
102+ # - errname
103+ - errorlint
104+ - exhaustive
105+ - exportloopref
106+ - forcetypeassert
107+ - gocognit
108+ - goconst
109+ - gocritic
110+ - godot
111+ - gofmt
112+ - goheader
113+ - goimports
114+ - goprintffuncname
115+ - gosimple
116+ - govet
117+ - ifshort
118+ - importas
119+ - ineffassign
120+ - makezero
121+ - misspell
122+ - nakedret
123+ - nestif
124+ - nilerr
125+ - noctx
126+ - nolintlint
127+ - predeclared
128+ - promlinter
129+ - revive
130+ - rowserrcheck
131+ - sqlclosecheck
132+ - staticcheck
133+ - structcheck
134+ - stylecheck
135+ - thelper
136+ - tparallel
137+ - typecheck
138+ - unconvert
139+ - unparam
140+ - unused
141+ - varcheck
142+ - wastedassign
143+ - whitespace
144+
145+ # Disabled linters, due to being misaligned with Go practices
146+ # - exhaustivestruct
147+ # - gochecknoglobals
148+ # - gochecknoinits
149+ # - goconst
150+ # - godox
151+ # - goerr113
152+ # - gomnd
153+ # - lll
154+ # - nlreturn
155+ # - testpackage
156+ # - wsl
157+
158+ # Disabled linters, due to not being relevant to our code base:
159+ # - maligned
160+ # - prealloc "For most programs usage of prealloc will be a premature optimization."
161+
162+ # Disabled linters due to bad error messages or bugs
163+ # - gofumpt
164+ # - gosec
165+ # - tagliatelle
166+
167+
168+ issues :
169+ # Excluding configuration per-path, per-linter, per-text and per-source
170+ exclude-rules :
171+ - path : _test\.go
172+ linters :
173+ - gocyclo
174+ - errcheck
175+ - dupl
176+ - gosec
177+
178+ - path : cmd.*
179+ linters :
180+ - noctx
181+
182+ - path : main\.go
183+ linters :
184+ - noctx
185+
186+ # This check is of questionable value
187+ - linters :
188+ - tparallel
189+ text : " call t.Parallel on the top level as well as its subtests"
190+
191+ # Don't hide lint issues just because there are many of them
192+ max-same-issues : 0
193+ max-issues-per-linter : 0
0 commit comments