-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy path.golangci.yml
More file actions
executable file
·165 lines (164 loc) · 3.18 KB
/
Copy path.golangci.yml
File metadata and controls
executable file
·165 lines (164 loc) · 3.18 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
version: "2"
run:
modules-download-mode: readonly
# List from https://golangci-lint.run/usage/linters/
linters:
enable:
- asasalint
- asciicheck
- bidichk
- containedctx
- decorder
- dogsled
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
- fatcontext
- forbidigo
- forcetypeassert
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- godot
- goheader
- gomodguard
- goprintffuncname
- gosec
- gosmopolitan
- grouper
- iface
- importas
- interfacebloat
- lll
- loggercheck
- makezero
- mirror
- misspell
- nakedret
- nilerr
- noctx
- nolintlint
- perfsprint
- prealloc
- predeclared
- reassign
- revive
- staticcheck
- tagalign
- testableexamples
- testifylint
- testpackage
- thelper
- tparallel
- unconvert
- usestdlibvars
- wastedassign
- whitespace
disable:
- bodyclose
- canonicalheader
- contextcheck # Re-enable in V2
- copyloopvar
- cyclop
- depguard
- dupl
- dupword
- err113
- exhaustruct
- funlen
- ginkgolinter
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocyclo
- godox
- gomoddirectives
- inamedparam
- intrange
- ireturn
- maintidx
- mnd
- musttag
- nestif # TODO: Re-enable in V2
- nilnil
- nlreturn
- nonamedreturns
- nosprintfhostport
- paralleltest
- promlinter
- protogetter
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- tagliatelle
- unparam
- varnamelen
- wrapcheck
- wsl
- zerologlint
settings:
gosec:
excludes:
- G402 # InsecureSkipVerify
- G102 # Binds to all network interfaces
- G403 # RSA keys should be at least 2048 bits
- G115 # Integer overflow conversion (uint64 -> int64)
- G404 # Use of weak random number generator (math/rand)
- G204 # Subprocess launched with a potential tainted input or cmd arguments
- G602 # Slice index out of range
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- gocritic
text: ifElseChain
- linters:
- lll
source: '^// '
- linters:
- revive
text: 'add-constant: '
- linters:
- revive
text: 'unused-parameter: '
- linters:
- revive
text: 'empty-block: '
- linters:
- revive
text: 'var-naming: ' # TODO: Re-enable in V2
- linters:
- staticcheck
text: ' should be ' # TODO: Re-enable in V2
- linters:
- staticcheck
text: 'ST1003: should not use ALL_CAPS in Go names; use CamelCase instead'
paths:
- examples$
- transport
formatters:
enable:
- gci
- gofmt
- gofumpt
settings:
gci:
sections:
- standard
- default
custom-order: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$