19
19
# build-tags:
20
20
# - mytag
21
21
22
- # which dirs to skip: issues from them won't be reported;
23
- # can use regexp here: generated.*, regexp is applied on full path;
24
- # default value is empty list, but default dirs are skipped independently
25
- # from this option's value (see skip-dirs-use-default).
26
- # skip-dirs:
27
- # - src/external_libs
28
- # - autogenerated_by_my_lib
29
-
30
- # default is true. Enables skipping of directories:
31
- # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
32
- skip-dirs-use-default : true
33
-
34
22
# which files to skip: they will be analyzed, but issues from them
35
23
# won't be reported. Default value is empty list, but there is
36
24
# no need to include all autogenerated files, we confidently recognize
39
27
# - ".*\\.my\\.go$"
40
28
# - lib/bad.go
41
29
42
- # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
43
- # If invoked with -mod=readonly, the go command is disallowed from the implicit
44
- # automatic updating of go.mod described above. Instead, it fails when any changes
45
- # to go.mod are needed. This setting is most useful to check that go.mod does
46
- # not need updates, such as in a continuous integration and testing system.
47
- # If invoked with -mod=vendor, the go command assumes that the vendor
48
- # directory holds the correct copies of dependencies and ignores
49
- # the dependency descriptions in go.mod.
50
- # modules-download-mode: readonly|release|vendor
51
-
52
30
# output configuration options
53
31
output :
54
32
formats :
@@ -89,12 +67,12 @@ linters-settings:
89
67
90
68
# Disable error checking, as errorcheck detects more errors and is more configurable.
91
69
gosec :
92
- exclude :
93
- - " G104"
70
+ excludes :
71
+ - " G104"
94
72
95
73
govet :
96
- # report about shadowed variables
97
- check-shadowing : false
74
+ disable :
75
+ - shadow
98
76
99
77
# settings per analyzer
100
78
settings :
@@ -112,25 +90,20 @@ linters-settings:
112
90
# disable:
113
91
# - shadow
114
92
# disable-all: false
115
- golint :
93
+ revive :
116
94
# minimal confidence for issues, default is 0.8
117
- min-confidence : 0.8
95
+ confidence : 0.8
96
+ ignore-generated-header : true
97
+ severity : warning
118
98
gofmt :
119
99
# simplify code: gofmt with `-s` option, true by default
120
100
simplify : true
121
- goimports :
122
- # put imports beginning with prefix after 3rd-party packages;
123
- # it's a comma-separated list of prefixes
124
- # local-prefixes: github.com/org/project
125
101
gocyclo :
126
102
# minimal code complexity to report, 30 by default (but we recommend 10-20)
127
103
min-complexity : 30
128
104
gocognit :
129
105
# minimal code complexity to report, 30 by default (but we recommend 10-20)
130
106
min-complexity : 100
131
- maligned :
132
- # print struct with more effective memory layout or not, false by default
133
- suggest-new : true
134
107
dupl :
135
108
# tokens count to trigger issue, 150 by default
136
109
threshold : 100
@@ -191,12 +164,6 @@ linters-settings:
191
164
line-length : 120
192
165
# tab width in spaces. Default to 1.
193
166
tab-width : 1
194
- unused :
195
- # treat code as a program (not a library) and report unused exported identifiers; default is false.
196
- # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
197
- # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
198
- # with golangci-lint call it on a directory with the changed file.
199
- check-exported : false
200
167
unparam :
201
168
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
202
169
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
@@ -269,9 +236,6 @@ linters-settings:
269
236
allow-trailing-comment : false
270
237
# Force newlines in end of case at this limit (0 = never).
271
238
force-case-trailing-whitespace : 0
272
- revive :
273
- ignore-generated-header : true
274
- severity : warning
275
239
funlen :
276
240
# Checks the number of lines in a function.
277
241
# If lower than 0, disable the check.
0 commit comments