Skip to content

Commit 23bb016

Browse files
authored
Fix issues in .golangci.yml file to verify it is valid (#200)
Signed-off-by: Arrobo, Gabriel <[email protected]>
1 parent 46528b1 commit 23bb016

File tree

1 file changed

+17
-56
lines changed

1 file changed

+17
-56
lines changed

.golangci.yml

+17-56
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,7 @@ run:
1717
# include test files or not, default is true
1818
tests: true
1919
# 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: []
3021
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
3122
# If invoked with -mod=readonly, the go command is disallowed from the implicit
3223
# automatic updating of go.mod described above. Instead, it fails when any changes
@@ -42,7 +33,8 @@ run:
4233
# output configuration options
4334
output:
4435
# 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
4638
# print lines of code with issue, default is true
4739
print-issued-lines: true
4840
# print linter name in the end of issue text, default is true
@@ -82,8 +74,8 @@ linters-settings:
8274
# See https://go-critic.github.io/overview#checks-overview
8375
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
8476
# By default list of stable checks is used.
85-
enabled-checks:
86-
#- rangeValCopy
77+
# enabled-checks:
78+
# - rangeValCopy
8779
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
8880
disabled-checks:
8981
- regexpMust
@@ -119,31 +111,19 @@ linters-settings:
119111
# put imports beginning with prefix after 3rd-party packages;
120112
# it's a comma-separated list of prefixes
121113
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
137117
# - gopkg.in/yaml.v2
138-
domains: # List of allowed module domains
118+
# domains: # List of allowed module domains
139119
# - golang.org
140-
blocked:
141-
modules: # List of blocked modules
120+
# blocked:
121+
# modules: # List of blocked modules
142122
# - github.com/uudashr/go-module: # Blocked module
143123
# recommendations: # Recommended modules that should be used instead (Optional)
144124
# - golang.org/x/mod
145125
# 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
147127
# - github.com/mitchellh/go-homedir: # Blocked module with version constraint
148128
# version: "< 1.1.0" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
149129
# reason: "testing if blocked version constraint works." # Reason why the version constraint exists. (Optional)
@@ -158,41 +138,24 @@ linters-settings:
158138
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
159139
# enable all analyzers
160140
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"
169141
lll:
170142
# max line length, lines longer will be reported. Default is 120.
171143
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
172144
line-length: 120
173145
# tab width in spaces. Default to 1.
174146
tab-width: 1
175-
maligned:
176-
# print struct with more effective memory layout or not, false by default
177-
suggest-new: true
178147
nakedret:
179148
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
180149
max-func-lines: 30
181150
testpackage:
182151
# regexp pattern to skip files
183152
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
190153
whitespace:
191154
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
192155
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
193-
misspell:
156+
# misspell:
194157
#locale: US
195-
ignore-words:
158+
# ignore-words:
196159
wsl:
197160
# If true append is only allowed to be cuddled if appending value is
198161
# matching variables, fields or types on line above. Default is true.
@@ -212,8 +175,6 @@ linters-settings:
212175
force-err-cuddling: false
213176
# Allow leading comments to be separated with empty liens
214177
allow-separated-leading-comment: false
215-
custom:
216-
# Each custom linter should have a unique name.
217178

218179
linters:
219180
enable:
@@ -254,9 +215,9 @@ issues:
254215
# But independently from this option we use default exclude patterns,
255216
# it can be disabled by `exclude-use-default: false`. To list all
256217
# excluded by default patterns execute `golangci-lint run --help`
257-
exclude:
218+
exclude: []
258219
# Excluding configuration per-path, per-linter, per-text and per-source
259-
exclude-rules:
220+
exclude-rules: []
260221
# Exclude some linters from running on tests files.
261222
# Independently from option `exclude` we use default exclude patterns,
262223
# it can be disabled by this option. To list all
@@ -267,7 +228,7 @@ issues:
267228
# regular expressions become case sensitive.
268229
exclude-case-sensitive: false
269230
# The list of ids of default excludes to include or disable. By default it's empty.
270-
include:
231+
include: []
271232
#- EXC0002 # disable excluding of issues about comments from golint
272233
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
273234
#max-issues-per-linter: 0

0 commit comments

Comments
 (0)