-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
.golangci.yml
executable file
·162 lines (158 loc) · 3.02 KB
/
.golangci.yml
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
run:
timeout: 5m
modules-download-mode: readonly
go: '1.20'
# List from https://golangci-lint.run/usage/linters/
linters:
enable:
# Default linters
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
# Other linters
- asasalint
- asciicheck
- bidichk
- containedctx
- decorder
- dogsled
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
- fatcontext
- forbidigo
- forcetypeassert
- gci
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- godot
- gofmt
- gofumpt
- goheader
- gomodguard
- goprintffuncname
- gosec
- gosmopolitan
- grouper
- iface
- importas
- interfacebloat
- lll
- loggercheck
- makezero
- mirror
- misspell
- nakedret
- nilerr
- noctx
- nolintlint
- perfsprint
- prealloc
- predeclared
- reassign
- revive
- stylecheck
- tagalign
- tenv
- testableexamples
- testifylint
- testpackage
- thelper
- tparallel
- unconvert
- usestdlibvars
- wastedassign
- whitespace
- exportloopref
disable:
- bodyclose
- canonicalheader
- contextcheck # Re-enable in V2
- copyloopvar
- cyclop
- depguard
- dupl
- dupword
- err113
- exhaustruct
- funlen
- ginkgolinter
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocyclo
- godox
- goimports
- 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
linters-settings:
gci:
sections:
- standard
- default
skip-generated: false
custom-order: true
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
issues:
exclude-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:
- stylecheck
text: " should be " # TODO: Re-enable in V2
- linters:
- stylecheck
text: "ST1003: should not use ALL_CAPS in Go names; use CamelCase instead" # TODO: Re-enable in V2