1+ version : " 2"
12run :
23 timeout : 5m
3- go : " 1.24 "
4+ go : " 1.25 "
45 tests : false
56 allow-parallel-runners : true
6-
7- output :
8- formats :
9- - format : github-actions
10-
117linters :
12- disable-all : true
8+ default : none
139 enable :
14- - dupl # check duplicated code
15- - goconst # check strings that can turn into constants
16- - gofmt # check fmt
17- - goimports # check imports
18- - gosec # check for security problems
19- - govet # check vet
20- - importas # check consistent import aliasing
21- - ineffassign # check ineffectual assignments
22- - misspell # check for misspelled English words
23- - nakedret # check naked returns in functions
24- - prealloc # check preallocated slice declarations
25- - revive # replacement for golint
26- - unconvert # check redundant type conversions
27- - whitespace # check for trailing whitespace and tabs
28- linters-settings :
29- revive :
30- rules :
31- # The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
32- - name : blank-imports
33- - name : context-as-argument
34- - name : context-keys-type
35- - name : dot-imports
36- - name : error-return
37- - name : error-strings
38- - name : error-naming
39- - name : exported
40- - name : increment-decrement
41- - name : var-naming
42- - name : var-declaration
43- - name : package-comments
44- - name : range
45- - name : receiver-naming
46- - name : time-naming
47- - name : indent-error-flow
48- - name : errorf
49- - name : empty-block
50- - name : superfluous-else
51- - name : unused-parameter
52- - name : unreachable-code
53- - name : redefines-builtin-id
54- importas :
55- no-unaliased : true
56- alias :
57- # Kubernetes
58- - pkg : k8s.io/api/core/v1
59- alias : corev1
60- - pkg : k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
61- alias : apiextensionsv1
62- - pkg : k8s.io/api/apps/v1
63- alias : appsv1
64- - pkg : k8s.io/apimachinery/pkg/apis/meta/v1
65- alias : metav1
66- - pkg : k8s.io/apimachinery/pkg/util/runtime
67- alias : utilruntime
68- - pkg : sigs.k8s.io/controller-runtime/pkg/client
69- alias : runtimeclient
70- - pkg : k8s.io/apimachinery/pkg/util/errors
71- alias : kerrors
72- - pkg : k8s.io/client-go/kubernetes/scheme
73- alias : clientgoscheme
74- # Rancher GKE operator
75- - pkg : github.com/rancher/gke-operator/pkg/apis/gke.cattle.io/v1
76- alias : gkev1
77- - pkg : github.com/rancher/gke-operator/pkg/generated/controllers/gke.cattle.io/v1
78- alias : gkecontrollers
79- # Golang API
80- - pkg : google.golang.org/api/container/v1
81- alias : gkeapi
82- issues :
83- exclude-rules :
84- - linters :
10+ - dupl
11+ - goconst
12+ - gosec
13+ - govet
14+ - importas
15+ - ineffassign
16+ - misspell
17+ - nakedret
18+ - prealloc
8519 - revive
86- text : " var-naming: don't use an underscore in package name"
87- path : ' mock(\w+)/doc.go$'
88- exclude-dirs :
89- - pkg/generated
90- exclude-files :
91- - " zz_generated_*"
20+ - unconvert
21+ - whitespace
22+ settings :
23+ importas :
24+ alias :
25+ - pkg : k8s.io/api/core/v1
26+ alias : corev1
27+ - pkg : k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
28+ alias : apiextensionsv1
29+ - pkg : k8s.io/api/apps/v1
30+ alias : appsv1
31+ - pkg : k8s.io/apimachinery/pkg/apis/meta/v1
32+ alias : metav1
33+ - pkg : k8s.io/apimachinery/pkg/util/runtime
34+ alias : utilruntime
35+ - pkg : sigs.k8s.io/controller-runtime/pkg/client
36+ alias : runtimeclient
37+ - pkg : k8s.io/apimachinery/pkg/api/errors
38+ alias : apierrors
39+ - pkg : k8s.io/apimachinery/pkg/util/errors
40+ alias : kerrors
41+ - pkg : k8s.io/client-go/kubernetes/scheme
42+ alias : clientgoscheme
43+ - pkg : github.com/rancher/aks-operator/pkg/apis/aks.cattle.io/v1
44+ alias : aksv1
45+ - pkg : github.com/rancher/aks-operator/pkg/generated/controllers/aks.cattle.io/v1
46+ alias : akscontrollers
47+ - pkg : github.com/rancher/rancher/pkg/apis/management.cattle.io/v3
48+ alias : managementv3
49+ no-unaliased : true
50+ revive :
51+ rules :
52+ - name : blank-imports
53+ - name : context-as-argument
54+ - name : context-keys-type
55+ - name : dot-imports
56+ - name : error-return
57+ - name : error-strings
58+ - name : error-naming
59+ - name : exported
60+ - name : increment-decrement
61+ - name : var-naming
62+ - name : var-declaration
63+ - name : package-comments
64+ - name : range
65+ - name : receiver-naming
66+ - name : time-naming
67+ - name : indent-error-flow
68+ - name : errorf
69+ - name : empty-block
70+ - name : superfluous-else
71+ - name : unused-parameter
72+ - name : unreachable-code
73+ - name : redefines-builtin-id
74+ exclusions :
75+ generated : lax
76+ presets :
77+ - comments
78+ - common-false-positives
79+ - legacy
80+ - std-error-handling
81+ rules :
82+ - linters :
83+ - revive
84+ path : mock(\w+)/doc.go$
85+ text : ' var-naming: don'' t use an underscore in package name'
86+ - linters :
87+ - revive
88+ path : utils/
89+ text : ' var-naming: avoid meaningless package names'
90+ - linters :
91+ - importas
92+ path : controller/gke-cluster-config-handler.go$
93+ text : ' imported without alias but must be with alias "apierrors"'
94+ paths :
95+ - zz_generated_*
96+ - pkg/generated
97+ - third_party$
98+ - builtin$
99+ - examples$
100+ formatters :
101+ enable :
102+ - gofmt
103+ - goimports
104+ exclusions :
105+ generated : lax
106+ paths :
107+ - zz_generated_*
108+ - pkg/generated
109+ - third_party$
110+ - builtin$
111+ - examples$
0 commit comments