17
17
# include test files or not, default is true
18
18
tests : true
19
19
# list of build tags, all linters use it. Default is empty list.
20
- build-tags :
21
- # which dirs to skip: issues from them won't be reported;
22
- # can use regexp here: generated.*, regexp is applied on full path;
23
- # default value is empty list, but default dirs are skipped independently
24
- # from this option's value (see skip-dirs-use-default).
25
- # "/" will be replaced by current OS file path separator to properly work
26
- # on Windows.
27
- skip-dirs :
28
- # default is true. Enables skipping of directories:
29
- # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
20
+ build-tags : []
30
21
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
31
22
# If invoked with -mod=readonly, the go command is disallowed from the implicit
32
23
# automatic updating of go.mod described above. Instead, it fails when any changes
42
33
# output configuration options
43
34
output :
44
35
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
45
- formats : colored-line-number
36
+ formats :
37
+ - format : colored-line-number
46
38
# print lines of code with issue, default is true
47
39
print-issued-lines : true
48
40
# print linter name in the end of issue text, default is true
@@ -82,8 +74,8 @@ linters-settings:
82
74
# See https://go-critic.github.io/overview#checks-overview
83
75
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
84
76
# By default list of stable checks is used.
85
- enabled-checks :
86
- # - rangeValCopy
77
+ # enabled-checks:
78
+ # - rangeValCopy
87
79
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
88
80
disabled-checks :
89
81
- regexpMust
@@ -119,31 +111,19 @@ linters-settings:
119
111
# put imports beginning with prefix after 3rd-party packages;
120
112
# it's a comma-separated list of prefixes
121
113
local-prefixes : github.com/omec-project
122
- golint :
123
- # minimal confidence for issues, default is 0.8
124
- min-confidence : 0.8
125
- gomnd :
126
- # the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
127
- checks :
128
- - argument
129
- - case
130
- - condition
131
- - operation
132
- - return
133
- - assign
134
- gomodguard :
135
- allowed :
136
- modules : # List of allowed modules
114
+ # gomodguard:
115
+ # allowed:
116
+ # modules: # List of allowed modules
137
117
# - gopkg.in/yaml.v2
138
- domains : # List of allowed module domains
118
+ # domains: # List of allowed module domains
139
119
# - golang.org
140
- blocked :
141
- modules : # List of blocked modules
120
+ # blocked:
121
+ # modules: # List of blocked modules
142
122
# - github.com/uudashr/go-module: # Blocked module
143
123
# recommendations: # Recommended modules that should be used instead (Optional)
144
124
# - golang.org/x/mod
145
125
# reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional)
146
- versions : # List of blocked module version constraints
126
+ # versions: # List of blocked module version constraints
147
127
# - github.com/mitchellh/go-homedir: # Blocked module with version constraint
148
128
# version: "< 1.1.0" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
149
129
# reason: "testing if blocked version constraint works." # Reason why the version constraint exists. (Optional)
@@ -158,41 +138,24 @@ linters-settings:
158
138
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
159
139
# enable all analyzers
160
140
enable-all : true
161
- depguard :
162
- list-type : blacklist
163
- include-go-root : false
164
- packages :
165
- - github.com/sirupsen/logrus
166
- packages-with-error-message :
167
- # specify an error message to output when a blacklisted package is used
168
- - github.com/sirupsen/logrus : " logging is allowed only by logutils.Log"
169
141
lll :
170
142
# max line length, lines longer will be reported. Default is 120.
171
143
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
172
144
line-length : 120
173
145
# tab width in spaces. Default to 1.
174
146
tab-width : 1
175
- maligned :
176
- # print struct with more effective memory layout or not, false by default
177
- suggest-new : true
178
147
nakedret :
179
148
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
180
149
max-func-lines : 30
181
150
testpackage :
182
151
# regexp pattern to skip files
183
152
skip-regexp : (export|internal)_test\.go
184
- unused :
185
- # treat code as a program (not a library) and report unused exported identifiers; default is false.
186
- # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
187
- # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
188
- # with golangci-lint call it on a directory with the changed file.
189
- check-exported : false
190
153
whitespace :
191
154
multi-if : false # Enforces newlines (or comments) after every multi-line if statement
192
155
multi-func : false # Enforces newlines (or comments) after every multi-line function signature
193
- misspell :
156
+ # misspell:
194
157
# locale: US
195
- ignore-words :
158
+ # ignore-words:
196
159
wsl :
197
160
# If true append is only allowed to be cuddled if appending value is
198
161
# matching variables, fields or types on line above. Default is true.
@@ -212,8 +175,6 @@ linters-settings:
212
175
force-err-cuddling : false
213
176
# Allow leading comments to be separated with empty liens
214
177
allow-separated-leading-comment : false
215
- custom :
216
- # Each custom linter should have a unique name.
217
178
218
179
linters :
219
180
enable :
@@ -254,9 +215,9 @@ issues:
254
215
# But independently from this option we use default exclude patterns,
255
216
# it can be disabled by `exclude-use-default: false`. To list all
256
217
# excluded by default patterns execute `golangci-lint run --help`
257
- exclude :
218
+ exclude : []
258
219
# Excluding configuration per-path, per-linter, per-text and per-source
259
- exclude-rules :
220
+ exclude-rules : []
260
221
# Exclude some linters from running on tests files.
261
222
# Independently from option `exclude` we use default exclude patterns,
262
223
# it can be disabled by this option. To list all
@@ -267,7 +228,7 @@ issues:
267
228
# regular expressions become case sensitive.
268
229
exclude-case-sensitive : false
269
230
# The list of ids of default excludes to include or disable. By default it's empty.
270
- include :
231
+ include : []
271
232
# - EXC0002 # disable excluding of issues about comments from golint
272
233
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
273
234
# max-issues-per-linter: 0
0 commit comments