Skip to content

Commit 29729c2

Browse files
committed
chore(linter): Fix linting errors and warnings within the config
- Replace the deprecated exportloopref with copyloopvar https://github.com/kyoh86/exportloopref https://golangci-lint.run/usage/linters/#exportloopref (No longer available) https://golangci-lint.run/usage/linters/#copyloopvar - mnd.checks is an array https://golangci-lint.run/usage/linters/#mnd - maligned is deprecated and no longer used https://golangci-lint.run/usage/configuration/#config-file - nolintlint.allow-leading-space was dropped some time ago golangci/golangci-lint#3063 Signed-off-by: Lee Yarwood <[email protected]>
1 parent d39e886 commit 29729c2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hack/linter/.golangci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ linters-settings:
3434
local-prefixes: kubevirt.io/kubevirt
3535
mnd:
3636
# don't include the "operation" and "assign"
37-
checks: argument,case,condition,return
37+
checks:
38+
- argument
39+
- case
40+
- condition
41+
- return
3842
ignored-functions:
3943
- '^Eventually$'
4044
- '^EventuallyWithOffset$'
@@ -46,12 +50,9 @@ linters-settings:
4650
- shadow
4751
lll:
4852
line-length: 140
49-
maligned:
50-
suggest-new: true
5153
misspell:
5254
locale: US
5355
nolintlint:
54-
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
5556
allow-unused: false # report any unused nolint directives
5657
require-explanation: false # don't require an explanation for nolint directives
5758
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
@@ -66,10 +67,10 @@ linters:
6667
disable-all: true
6768
enable:
6869
- bodyclose
70+
- copyloopvar
6971
- dogsled
7072
- dupl
7173
- errcheck
72-
- exportloopref
7374
- exhaustive
7475
- funlen
7576
- gochecknoinits

0 commit comments

Comments
 (0)