-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy path.golangci.yml
More file actions
177 lines (177 loc) · 3.49 KB
/
Copy path.golangci.yml
File metadata and controls
177 lines (177 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Repo-local golangci-lint configuration for reeflective/readline.
#
# Derived from the shared reeflective config, with a few project-specific tunes:
# - varnamelen/goconst/mnd disabled: short names in short scopes are idiomatic
# here, and bulk literal/number extraction adds churn without value.
# - gocognit threshold raised to 30 to match cyclop/gocyclo; the few genuinely
# complex hot-path parsers/display functions are intentionally dense.
# - nestif relaxed slightly (5 -> 7); the flagged blocks are shallow.
# - funlen/gocognit excluded for tests (table-driven tests are naturally long).
# - godox disabled: TODO/FIXME markers are kept intentionally as tracking notes.
version: "2"
run:
modules-download-mode: readonly
tests: true
allow-parallel-runners: true
linters:
enable:
- asasalint
- bidichk
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- copyloopvar
- cyclop
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- err113
- errchkjson
- errname
- errorlint
- exptostd
- fatcontext
- forcetypeassert
- funlen
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- gocognit
- gocritic
- gocyclo
- godot
- goheader
- gomoddirectives
- goprintffuncname
- gosec
- gosmopolitan
- grouper
- iface
- importas
- inamedparam
- interfacebloat
- intrange
- ireturn
- loggercheck
- maintidx
- makezero
- mirror
- misspell
- nakedret
- nestif
- nilerr
- nilnesserr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- paralleltest
- perfsprint
- prealloc
- predeclared
- protogetter
- reassign
- recvcheck
- revive
- sloglint
- spancheck
- tagalign
- tagliatelle
- testableexamples
- testifylint
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- usetesting
- wastedassign
- wsl
- zerologlint
disable:
- asciicheck
- depguard
- exhaustive
- exhaustruct
- forbidigo
- gochecknoglobals
- gochecknoinits
- goconst
- godox
- gomodguard
- lll
- mnd
- musttag
- nlreturn
- nonamedreturns
- promlinter
- rowserrcheck
- sqlclosecheck
- testpackage
- varnamelen
- whitespace
- wrapcheck
settings:
cyclop:
max-complexity: 30
package-average: 10
errcheck:
check-type-assertions: true
exhaustive:
check:
- switch
- map
funlen:
lines: 100
statements: 50
gocognit:
min-complexity: 30
nestif:
min-complexity: 7
paralleltest:
ignore-missing: true
wsl:
allow-separated-leading-comment: true
allow-cuddle-declarations: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- errcheck
- funlen
- gocognit
- gocyclo
- gosec
path: _test\.go
- linters:
- lll
source: '^//go:generate '
paths:
- third_party$
- builtin$
- examples$
issues:
max-same-issues: 0
formatters:
enable:
- gofumpt
- goimports
settings:
goimports:
local-prefixes:
- github.com/reeflective
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$