forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
162 lines (162 loc) · 3.51 KB
/
.golangci.yml
File metadata and controls
162 lines (162 loc) · 3.51 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
version: "2"
run:
build-tags:
- goexperiment.synctest
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- durationcheck
- fatcontext
- gochecksumtype
- gocritic
- gosmopolitan
- nilnesserr
- prealloc
- reassign
- govet
disable:
- testifylint
- errchkjson #TODO: enable me
- makezero #TODO: enable me
- noctx #TODO: enable me
- errorlint #TODO: enable me
- unused #TODO: enable me
- contextcheck
- err113
- exhaustive
- gocheckcompilerdirectives
- gosec
- musttag
- nilerr
- protogetter
- recvcheck
- unparam
- wrapcheck
- sqlclosecheck # we don't use SQL
- rowserrcheck # we don't use SQL
- zerologlint # not don't use Zerolog
- wastedassign # `ineffassign` linter is enabled by default
- spancheck # we don't use OpenTelemetry
- loggercheck # we don't use Zap
- unconvert # not enough profit from always enabling
settings:
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-checks:
- ruleguard
disabled-checks:
- unnecessaryDefer
- appendAssign
- regexpMust
- rangeValCopy
- exitAfterDefer
- elseif
- dupBranchBody
- assignOp
- singleCaseSwitch
- unlambda
- captLocal
- commentFormatting
- ifElseChain
- sloppyReassign
- sprintfQuotedString
- deferInLoop
- nilValReturn
- evalOrder
- returnAfterHttpError
- weakCond
- builtinShadowDecl
- uncheckedInlineErr
- preferStringWriter
- commentedOutCode
- preferFprint
- deprecatedComment
enabled-tags:
- performance
- diagnostic
settings:
hugeParam:
sizeThreshold: 1000
rangeExprCopy:
sizeThreshold: 512
skipTestFuncs: true
ruleguard:
rules: rules.go
underef:
skipRecvDeref: true
govet:
enable:
- nilness
- unusedwrite
disable:
- deepequalerrors
- fieldalignment
- shadow
- unsafeptr
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
text: not checked
- linters:
- staticcheck
text: ST1019|ST1029|ST5011|QF1003|SA1019|QF1008|S1021|QF1001|SA6005|S1002|QF1002|QF1012|QF1006|ST1005|SA5011|ST1023|ST1012|QF1011|S1019|S1000|S1000|S1009|ST1008|S1016|S1016|ST1017|SA4009|QF1007|SA6002|QF1010|SA9003
- linters:
- gocritic
- gosec
- perfsprint
- unused
path: test\.go
- linters:
- gocritic
- gosec
- unused
path: hack\.go
- linters:
- gocritic
- gosec
- unused
path: cmd/devp2p
- linters:
- gocritic
- gosec
path: metrics/sample\.go
- linters:
- gocritic
- gosec
path: p2p/dnsdisc
paths:
- build/
- vendor/
- third_party$
- builtin$
- examples$
- testdata
- execution-spec-tests
formatters:
enable:
- gofmt
settings:
gofmt:
simplify: false
exclusions:
generated: lax
paths:
- build/
- vendor/
- third_party$
- builtin$
- examples$
- testdata
- execution-spec-tests