-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.golangci.yml
More file actions
246 lines (246 loc) · 5.21 KB
/
.golangci.yml
File metadata and controls
246 lines (246 loc) · 5.21 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
version: "2"
run:
modules-download-mode: readonly
allow-serial-runners: true
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- copyloopvar
- depguard
- decorder
- dogsled
- dupword
- durationcheck
- err113
- errchkjson
- errname
- errorlint
- exhaustive
- forbidigo
- forcetypeassert
- ginkgolinter
- gochecksumtype
- goconst
- gocritic
- gomoddirectives
- goprintffuncname
- gosec
- grouper
- loggercheck
- makezero
- mirror
- misspell
- musttag
- nakedret
- nilerr
- nilnil
- nolintlint
- nonamedreturns
- nosprintfhostport
- perfsprint
- predeclared
- promlinter
- protogetter
- reassign
- revive
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- tagliatelle
- testableexamples
- testifylint
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- whitespace
- wrapcheck
- zerologlint
settings:
depguard:
rules:
all:
files:
- $all
list-mode: lax
deny:
- pkg: log$
desc: logging is provided by slog or internal/logging
- pkg: github.com/gofiber/fiber/v2/log
desc: logging is provided by slog or internal/logging
errcheck:
disable-default-exclusions: true
check-type-assertions: true
check-blank: true
errchkjson:
report-no-exported: true
exhaustive:
default-signifies-exhaustive: true
goconst:
numbers: true
gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- unnamedResult
settings:
captLocal:
paramsOnly: false
elseif:
skipBalanced: false
underef:
skipRecvDeref: false
gosec:
excludes:
- G104
config:
global:
audit: true
govet:
enable-all: true
grouper:
import-require-single-import: true
import-require-grouping: true
loggercheck:
require-string-key: true
no-printf-like: true
slog: true
misspell:
locale: US
nolintlint:
require-explanation: true
require-specific: true
nonamedreturns:
report-error-in-defer: true
perfsprint:
err-error: true
predeclared:
qualified-name: true
promlinter:
strict: true
revive:
enable-all-rules: true
rules:
- name: var-naming
disabled: false
arguments:
- []
- []
- - skip-package-name-checks: true
- name: add-constant
disabled: true
- name: argument-limit
disabled: true
- name: banned-characters
disabled: true
- name: cognitive-complexity
disabled: true
- name: confusing-results
disabled: true
- name: comment-spacings
arguments:
- nolint
disabled: true
- name: cyclomatic
disabled: true
- name: enforce-slice-style
arguments:
- make
disabled: true
- name: exported
disabled: true
- name: file-header
disabled: true
- name: function-result-limit
arguments:
- 3
- name: function-length
disabled: true
- name: line-length-limit
disabled: true
- name: max-public-structs
disabled: true
- name: modifies-parameter
disabled: true
- name: nested-structs
disabled: true
- name: package-comments
disabled: true
- name: optimize-operands-order
disabled: true
- name: unchecked-type-assertion
disabled: true
- name: unhandled-error
disabled: true
staticcheck:
checks:
- all
- -ST1000
- -ST1020
- -ST1021
- -ST1022
tagalign:
strict: true
tagliatelle:
case:
rules:
json: camel
testifylint:
enable-all: true
testpackage:
skip-regexp: ^$
unparam:
check-exported: false
unused:
field-writes-are-uses: true
exported-fields-are-used: true
usestdlibvars:
http-method: true
http-status-code: true
time-weekday: false
time-month: false
time-layout: false
crypto-hash: true
default-rpc-path: true
sql-isolation-level: true
tls-signature-scheme: true
constant-kind: true
wrapcheck:
ignore-package-globs:
- github.com/cmsgov/emmy-api/*
exclusions:
rules:
- path: '(.+)_test\.go'
linters:
- errcheck
- wrapcheck
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- prefix(github.com/cmsgov/emmy-api)
- default
- blank
- dot
custom-order: true
gofumpt:
module-path: github.com/cmsgov/emmy-api
extra-rules: true