File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 with :
1616 go-version-file : ' go.mod'
1717 - name : golangci-lint
18- uses : golangci/golangci-lint-action@v6
18+ uses : golangci/golangci-lint-action@v7
1919 with :
20- version : v1.64
20+ version : v2.0
Original file line number Diff line number Diff line change 1+ version : " 2"
12run :
2- timeout : 10m
33 allow-parallel-runners : true
4-
5- issues :
6- # don't skip warning about doc comments
7- # don't exclude the default set of lint
8- exclude-use-default : false
9- # restore some of the defaults
10- # (fill in the rest as needed)
11- exclude-rules :
12- - path : " clientutils/*"
13- linters :
14- - lll
15- - path : " envtestutils/*"
16- linters :
17- - lll
18- - path : " unstructuredutils/*"
19- linters :
20- - lll
21- - path : " metautils/*"
22- linters :
23- - lll
24- - path : " kustomizeutils/*"
25- linters :
26- - lll
27- - path : " configutils/*"
28- linters :
29- - lll
30- - path : " conditionutils/*"
31- linters :
32- - lll
33- - path : " testutils/*"
34- linters :
35- - lll
36- - path : " cmdutils/*"
37- linters :
38- - dupl
394linters :
40- disable-all : true
5+ default : none
416 enable :
427 - copyloopvar
438 - dupl
449 - errcheck
10+ - ginkgolinter
4511 - goconst
4612 - gocyclo
47- - gofmt
48- - goimports
49- - gosimple
5013 - govet
5114 - ineffassign
52- - ginkgolinter
5315 - lll
5416 - misspell
5517 - nakedret
5618 - prealloc
5719 - staticcheck
58- - typecheck
5920 - unconvert
6021 - unparam
61- - unused
22+ - unused
23+ exclusions :
24+ generated : lax
25+ rules :
26+ - linters :
27+ - lll
28+ path : clientutils/*
29+ - linters :
30+ - lll
31+ path : envtestutils/*
32+ - linters :
33+ - lll
34+ path : unstructuredutils/*
35+ - linters :
36+ - lll
37+ path : metautils/*
38+ - linters :
39+ - lll
40+ path : kustomizeutils/*
41+ - linters :
42+ - lll
43+ path : configutils/*
44+ - linters :
45+ - lll
46+ path : conditionutils/*
47+ - linters :
48+ - lll
49+ path : testutils/*
50+ - linters :
51+ - dupl
52+ path : cmdutils/*
53+ paths :
54+ - third_party$
55+ - builtin$
56+ - examples$
57+ formatters :
58+ enable :
59+ - gofmt
60+ - goimports
61+ exclusions :
62+ generated : lax
63+ paths :
64+ - third_party$
65+ - builtin$
66+ - examples$
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ GOLANGCILINT ?= $(LOCALBIN)/golangci-lint
7575ADDLICENSE_VERSION ?= v1.1.1
7676GOIMPORTS_VERSION ?= v0.31.0
7777MOCKGEN_VERSION ?= v0.5.0
78- GOLANGCILINT_VERSION ?= v1.64
78+ GOLANGCILINT_VERSION ?= v2.0
7979
8080.PHONY : addlicense
8181addlicense : $(ADDLICENSE ) # # Download addlicense locally if necessary.
@@ -95,4 +95,4 @@ $(MOCKGEN): $(LOCALBIN)
9595.PHONY : goimports
9696golangci-lint : $(GOLANGCILINT ) # # Download golangci-lint locally if necessary.
9797$(GOLANGCILINT ) : $(LOCALBIN )
98- test -s $(LOCALBIN ) /golangci-lint || GOBIN=$(LOCALBIN ) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCILINT_VERSION )
98+ test -s $(LOCALBIN ) /golangci-lint || GOBIN=$(LOCALBIN ) go install github.com/golangci/golangci-lint/v2/ cmd/golangci-lint@$(GOLANGCILINT_VERSION )
Original file line number Diff line number Diff line change @@ -467,7 +467,7 @@ func setObject(dst, src client.Object) error {
467467// IsOlderThan returns a function that determines whether an object is older than another.
468468func IsOlderThan (obj client.Object ) func (other client.Object ) (bool , error ) {
469469 return func (other client.Object ) (bool , error ) {
470- return obj .GetCreationTimestamp ().Time . After (other .GetCreationTimestamp ().Time ), nil
470+ return obj .GetCreationTimestamp ().After (other .GetCreationTimestamp ().Time ), nil
471471 }
472472}
473473
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ type BadList struct {
3131
3232func (b * BadList ) DeepCopyObject () runtime.Object {
3333 return & BadList {
34- * b .ListMeta . DeepCopy (),
34+ * b .DeepCopy (),
3535 b .TypeMeta ,
3636 }
3737}
You can’t perform that action at this time.
0 commit comments