Skip to content

Commit 2500b4b

Browse files
authored
Fix issues in .golangci.yml file to verify it is valid (#205)
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
1 parent 75e8511 commit 2500b4b

1 file changed

Lines changed: 15 additions & 54 deletions

File tree

.golangci.yml

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,7 @@ run:
1818
# include test files or not, default is true
1919
tests: true
2020
# list of build tags, all linters use it. Default is empty list.
21-
build-tags:
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-
# "/" will be replaced by current OS file path separator to properly work
27-
# on Windows.
28-
skip-dirs:
29-
# default is true. Enables skipping of directories:
30-
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
21+
build-tags: []
3122
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
3223
# If invoked with -mod=readonly, the go command is disallowed from the implicit
3324
# automatic updating of go.mod described above. Instead, it fails when any changes
@@ -43,7 +34,8 @@ run:
4334
# output configuration options
4435
output:
4536
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
46-
formats: colored-line-number
37+
formats:
38+
- format: colored-line-number
4739
# print lines of code with issue, default is true
4840
print-issued-lines: true
4941
# print linter name in the end of issue text, default is true
@@ -83,8 +75,8 @@ linters-settings:
8375
# See https://go-critic.github.io/overview#checks-overview
8476
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
8577
# By default list of stable checks is used.
86-
enabled-checks:
87-
#- rangeValCopy
78+
# enabled-checks:
79+
# - rangeValCopy
8880
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
8981
disabled-checks:
9082
- regexpMust
@@ -120,31 +112,19 @@ linters-settings:
120112
# put imports beginning with prefix after 3rd-party packages;
121113
# it's a comma-separated list of prefixes
122114
local-prefixes: github.com/omec-project
123-
golint:
124-
# minimal confidence for issues, default is 0.8
125-
min-confidence: 0.8
126-
gomnd:
127-
# the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
128-
checks:
129-
- argument
130-
- case
131-
- condition
132-
- operation
133-
- return
134-
- assign
135-
gomodguard:
136-
allowed:
137-
modules: # List of allowed modules
115+
# gomodguard:
116+
# allowed:
117+
# modules: # List of allowed modules
138118
# - gopkg.in/yaml.v2
139-
domains: # List of allowed module domains
119+
# domains: # List of allowed module domains
140120
# - golang.org
141-
blocked:
142-
modules: # List of blocked modules
121+
# blocked:
122+
# modules: # List of blocked modules
143123
# - github.com/uudashr/go-module: # Blocked module
144124
# recommendations: # Recommended modules that should be used instead (Optional)
145125
# - golang.org/x/mod
146126
# reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional)
147-
versions: # List of blocked module version constraints
127+
# versions: # List of blocked module version constraints
148128
# - github.com/mitchellh/go-homedir: # Blocked module with version constraint
149129
# version: "< 1.1.0" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
150130
# reason: "testing if blocked version constraint works." # Reason why the version constraint exists. (Optional)
@@ -159,35 +139,18 @@ linters-settings:
159139
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
160140
# enable all analyzers
161141
enable-all: true
162-
depguard:
163-
list-type: blacklist
164-
include-go-root: false
165-
packages:
166-
- github.com/sirupsen/logrus
167-
packages-with-error-message:
168-
# specify an error message to output when a blacklisted package is used
169-
- github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
170142
lll:
171143
# max line length, lines longer will be reported. Default is 120.
172144
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
173145
line-length: 120
174146
# tab width in spaces. Default to 1.
175147
tab-width: 1
176-
maligned:
177-
# print struct with more effective memory layout or not, false by default
178-
suggest-new: true
179148
nakedret:
180149
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
181150
max-func-lines: 30
182151
testpackage:
183152
# regexp pattern to skip files
184153
skip-regexp: (export|internal)_test\.go
185-
unused:
186-
# treat code as a program (not a library) and report unused exported identifiers; default is false.
187-
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
188-
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
189-
# with golangci-lint call it on a directory with the changed file.
190-
check-exported: false
191154
whitespace:
192155
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
193156
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
@@ -214,8 +177,6 @@ linters-settings:
214177
force-err-cuddling: false
215178
# Allow leading comments to be separated with empty liens
216179
allow-separated-leading-comment: false
217-
custom:
218-
# Each custom linter should have a unique name.
219180

220181
linters:
221182
enable:
@@ -256,9 +217,9 @@ issues:
256217
# But independently from this option we use default exclude patterns,
257218
# it can be disabled by `exclude-use-default: false`. To list all
258219
# excluded by default patterns execute `golangci-lint run --help`
259-
exclude:
220+
exclude: []
260221
# Excluding configuration per-path, per-linter, per-text and per-source
261-
exclude-rules:
222+
exclude-rules: []
262223
# Exclude some linters from running on tests files.
263224
# Independently from option `exclude` we use default exclude patterns,
264225
# it can be disabled by this option. To list all
@@ -269,7 +230,7 @@ issues:
269230
# regular expressions become case sensitive.
270231
exclude-case-sensitive: false
271232
# The list of ids of default excludes to include or disable. By default it's empty.
272-
include:
233+
include: []
273234
#- EXC0002 # disable excluding of issues about comments from golint
274235
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
275236
#max-issues-per-linter: 0

0 commit comments

Comments
 (0)