File tree 3 files changed +69
-51
lines changed
3 files changed +69
-51
lines changed Original file line number Diff line number Diff line change 44
44
sudo apt-get update
45
45
sudo apt-get install -y libze1 libze-dev
46
46
- name : golangci-lint
47
- uses : golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6
47
+ uses : golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7
48
48
with :
49
- version : v1.64.5
49
+ version : v2.0.2
50
50
args : -v --timeout 5m
51
51
build :
52
52
name : Build and check device plugins
Original file line number Diff line number Diff line change
1
+ version : " 2"
1
2
run :
2
- tests : true
3
3
build-tags :
4
4
- kerneldrv
5
-
5
+ tests : true
6
6
linters :
7
- disable-all : true
7
+ default : none
8
8
enable :
9
9
- asciicheck
10
10
- bodyclose
11
+ - copyloopvar
11
12
- dogsled
13
+ - err113
12
14
- errcheck
13
- - copyloopvar
14
15
- gocognit
15
16
- goconst
16
17
- gocyclo
17
18
- godot
18
- - err113
19
- - gofmt
20
- - goimports
21
19
- gomodguard
22
- - gosimple
20
+ - goprintffuncname
23
21
- gosec
24
22
- govet
25
- - goprintffuncname
26
23
- ineffassign
27
24
- misspell
28
25
- nakedret
@@ -31,46 +28,67 @@ linters:
31
28
- prealloc
32
29
- revive
33
30
- staticcheck
34
- - stylecheck
35
- - typecheck
36
31
- unconvert
37
32
- unused
38
33
- whitespace
39
34
- wsl
40
-
41
- linters-settings :
42
- revive :
35
+ settings :
36
+ gocognit :
37
+ min-complexity : 31
38
+ gocyclo :
39
+ min-complexity : 15
40
+ govet :
41
+ enable :
42
+ - fieldalignment
43
+ - shadow
44
+ revive :
45
+ rules :
46
+ - name : unused-parameter
47
+ disabled : true
48
+ exclusions :
49
+ generated : lax
50
+ presets :
51
+ - comments
52
+ - common-false-positives
53
+ - legacy
54
+ - std-error-handling
43
55
rules :
44
- - name : unused-parameter
45
- disabled : true
46
- gofmt :
47
- simplify : true
48
- goconst :
49
- ignore-tests : true
50
- govet :
51
- enable :
52
- - " fieldalignment"
53
- - " shadow"
54
- gocyclo :
55
- min-complexity : 15
56
- gocognit :
57
- min-complexity : 31
58
-
59
- issues :
60
- exclude-rules :
61
- - linters :
62
- - gosec
63
- text : " G115"
64
- - path : _test\.go
65
- linters :
66
- - gocognit
67
- - wsl
68
- - gocyclo
69
- - path : test/e2e/
70
- linters :
71
- - wsl
72
- - gocognit
73
- - gocyclo
74
- - path : cmd/gpu_fakedev/
75
- linters :
76
- - wsl
56
+ - linters :
57
+ - staticcheck
58
+ text : QF100(1|4|8)
59
+ - linters :
60
+ - gosec
61
+ text : G115
62
+ - linters :
63
+ - gocognit
64
+ - gocyclo
65
+ - wsl
66
+ path : _test\.go
67
+ - linters :
68
+ - gocognit
69
+ - gocyclo
70
+ - wsl
71
+ path : test/e2e/
72
+ - linters :
73
+ - wsl
74
+ path : cmd/gpu_fakedev/
75
+ - linters :
76
+ - goconst
77
+ path : (.+)_test\.go
78
+ paths :
79
+ - third_party$
80
+ - builtin$
81
+ - examples$
82
+ formatters :
83
+ enable :
84
+ - gofmt
85
+ - goimports
86
+ settings :
87
+ gofmt :
88
+ simplify : true
89
+ exclusions :
90
+ generated : lax
91
+ paths :
92
+ - third_party$
93
+ - builtin$
94
+ - examples$
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ EXTRA_BUILD_ARGS ?= ""
10
10
11
11
CERT_MANAGER_VERSION ?= v1.15.2
12
12
CONTROLLER_GEN_VERSION ?= v0.17.0
13
- GOLANGCI_LINT_VERSION ?= v1.64.5
13
+ GOLANGCI_LINT_VERSION ?= v2.0.2
14
14
KIND_VERSION ?= v0.23.0
15
15
GOLICENSES_VERSION ?= v1.6.0
16
16
# Default bundle image tag
@@ -44,7 +44,7 @@ vendor:
44
44
45
45
install-tools :
46
46
GO111MODULE=on $(GO ) install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION )
47
- $(GO ) install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION )
47
+ $(GO ) install github.com/golangci/golangci-lint/v2/ cmd/golangci-lint@$(GOLANGCI_LINT_VERSION )
48
48
$(GO ) install sigs.k8s.io/kind@${KIND_VERSION}
49
49
50
50
go-mod-tidy :
You can’t perform that action at this time.
0 commit comments