4
4
concurrency : 4
5
5
6
6
# timeout for analysis, e.g. 30s, 5m, default is 1m
7
- deadline : 10m
7
+ timeout : 10m
8
8
9
9
# exit code when at least one issue was found, default is 1
10
10
issues-exit-code : 1
16
16
# build-tags:
17
17
# - mytag
18
18
19
+ issues :
19
20
# which dirs to skip: they won't be analyzed;
20
21
# can use regexp here: generated.*, regexp is applied on full path;
21
22
# default value is empty list, but next dirs are always skipped independently
22
23
# from this option's value:
23
24
# third_party$, testdata$, examples$, Godeps$, builtin$
24
- skip -dirs :
25
+ exclude -dirs :
25
26
- ^pkg.*client.*clientset.*versioned.*
26
27
- ^pkg.*client.*informers.*externalversions.*
27
28
- pkg.*mod.*k8s.io.*
28
29
29
- # which files to skip: they will be analyzed, but issues from them
30
- # won't be reported. Default value is empty list, but there is
31
- # no need to include all autogenerated files, we confidently recognize
32
- # autogenerated files. If it's not please let us know.
33
- skip-files : []
34
- # - ".*\\.my\\.go$"
35
- # - lib/bad.go
36
-
37
30
# output configuration options
38
31
output :
39
32
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
40
- format : tab
33
+ formats :
34
+ - format : tab
41
35
42
36
# print lines of code with issue, default is true
43
37
print-issued-lines : true
@@ -71,9 +65,6 @@ linters-settings:
71
65
statements : 40
72
66
73
67
govet :
74
- # report about shadowed variables
75
- check-shadowing : true
76
-
77
68
# settings per analyzer
78
69
settings :
79
70
printf : # analyzer name, run `go tool vet help` to see all analyzers
@@ -82,13 +73,18 @@ linters-settings:
82
73
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
83
74
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
84
75
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
76
+ - github.com/dapr/cli/pkg/print.FailureStatusEvent
77
+ - github.com/dapr/cli/pkg/print.SuccessStatusEvent
78
+ - github.com/dapr/cli/pkg/print.WarningStatusEvent
79
+ - github.com/dapr/cli/pkg/print.InfoStatusEvent
80
+ - github.com/dapr/cli/pkg/print.StatusEvent
81
+ - github.com/dapr/cli/pkg/print.Spinner
85
82
86
83
# enable or disable analyzers by name
87
84
enable :
88
85
- atomicalign
89
- enable-all : false
90
- disable :
91
86
- shadow
87
+ enable-all : false
92
88
disable-all : false
93
89
revive :
94
90
# linting errors below this confidence will be ignored, default is 0.8
@@ -106,9 +102,6 @@ linters-settings:
106
102
gocognit :
107
103
# minimal code complexity to report, 30 by default (but we recommend 10-20)
108
104
min-complexity : 10
109
- maligned :
110
- # print struct with more effective memory layout or not, false by default
111
- suggest-new : true
112
105
dupl :
113
106
# tokens count to trigger issue, 150 by default
114
107
threshold : 100
@@ -141,7 +134,7 @@ linters-settings:
141
134
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
142
135
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
143
136
# with golangci-lint call it on a directory with the changed file.
144
- check- exported : false
137
+ exported-fields-are-used : false
145
138
unparam :
146
139
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
147
140
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
@@ -216,12 +209,17 @@ linters-settings:
216
209
# Allow case blocks to end with a whitespace.
217
210
# Allow declarations (var) to be cuddled.
218
211
allow-cuddle-declarations : false
212
+ testifylint :
213
+ disable :
214
+ - require-error
215
+
219
216
220
217
linters :
221
218
fast : false
222
219
enable-all : true
223
220
disable :
224
221
# TODO Enforce the below linters later
222
+ - musttag
225
223
- dupl
226
224
- errcheck
227
225
- funlen
@@ -230,39 +228,48 @@ linters:
230
228
- gocyclo
231
229
- gocognit
232
230
- godox
233
- - interfacer
234
231
- lll
235
- - maligned
236
- - scopelint
237
232
- unparam
238
233
- wsl
239
234
- gomnd
240
235
- testpackage
241
236
- nestif
242
- - goerr113
243
237
- nlreturn
244
238
- exhaustive
245
- - gci
246
- - noctx
247
- - exhaustivestruct
248
239
- exhaustruct
249
- - gomoddirectives
250
- - paralleltest
240
+ - noctx
241
+ - gci
251
242
- tparallel
252
- - wastedassign
253
- - cyclop
254
- - forbidigo
255
- - tagliatelle
256
- - thelper
243
+ - paralleltest
257
244
- wrapcheck
245
+ - tagliatelle
246
+ - ireturn
247
+ - errchkjson
248
+ - contextcheck
249
+ - gomoddirectives
250
+ - godot
251
+ - cyclop
258
252
- varnamelen
253
+ - errorlint
259
254
- forcetypeassert
260
- - ireturn
261
- - golint
262
- - nosnakecase
255
+ - maintidx
256
+ - nilnil
257
+ - predeclared
258
+ - tenv
259
+ - thelper
260
+ - wastedassign
261
+ - containedctx
262
+ - gosimple
263
+ - nonamedreturns
264
+ - asasalint
265
+ - rowserrcheck
266
+ - sqlclosecheck
267
+ - inamedparam
263
268
- tagalign
264
- - varcheck
265
- - deadcode
266
- - structcheck
267
- - ifshort
268
- - testifylint
269
+ - mnd
270
+ - canonicalheader
271
+ - exportloopref
272
+ - execinquery
273
+ - err113
274
+ - fatcontext
275
+ - forbidigo
0 commit comments