1- # Options for analysis running.
1+ version : " 2 "
22run :
33 go : " 1.23"
44 allow-parallel-runners : true
5- issues :
6- exclude-files :
7- - " .*_test \\ .go$ "
8- include :
9- - EXC0012
10- - EXC0014
11- exclude-rules :
12- - path : _test\.go
13- linters :
14- - testpackage
15- - gochecknoglobals
16- - path : internal/controllers/import_controller(_v3)?\.go
17- linters :
18- - dupl
19- - path : exp/day2/controllers/.*.go
20- linters :
21- - dupl
22- - text : var-naming
23- linters :
24- - revive
25- - text : ST1003
26- linters :
27- - stylecheck
28- - linters :
29- - revive
30- text : " exported: exported method .* \\ .(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported "
31- path : exp/day2/controllers/.*.go
32- - path : exp/day2/controllers/.*.go
33- linters :
34- - unused
35- linters-settings :
36- funlen :
37- lines : 110
38- statements : 60
39- lll :
40- line-length : 150
41- goimports :
42- local-prefixes : github.com/rancher/turtles
43- gci :
44- custom-order : true
45- sections :
46- - " standard "
47- - " blank "
48- - " dot "
49- - " default "
50- - " prefix(sigs.k8s.io/cluster-api) "
51- - " prefix(github.com/rancher/turtles) "
52- importas :
53- no-unaliased : true
5+ linters :
6+ default : all
7+ disable :
8+ - containedctx
9+ - cyclop
10+ - depguard
11+ - err113
12+ - exhaustive
13+ - exhaustruct
14+ - funlen
15+ - gochecknoglobals
16+ - gochecknoinits
17+ - gocritic
18+ - godox
19+ - ireturn
20+ - mnd
21+ - nlreturn
22+ - nolintlint
23+ - nonamedreturns
24+ - paralleltest
25+ - rowserrcheck
26+ - sqlclosecheck
27+ - tagliatelle
28+ - varnamelen
29+ - wastedassign
30+ - wrapcheck
31+ settings :
32+ funlen :
33+ lines : 110
34+ statements : 60
35+ goheader :
36+ values :
37+ regexp :
38+ copyright_regex : ' Copyright © (\d{4})(?: - (\d{4}))? SUSE LLC '
39+ template : |-
40+ {{copyright_regex}}
41+
42+ Licensed under the Apache License, Version 2.0 (the "License");
43+ you may not use this file except in compliance with the License.
44+ You may obtain a copy of the License at
45+
46+ http://www.apache.org/licenses/LICENSE-2.0
47+
48+ Unless required by applicable law or agreed to in writing, software
49+ distributed under the License is distributed on an "AS IS" BASIS,
50+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51+ See the License for the specific language governing permissions and
52+ limitations under the License.
53+ importas :
5454 alias :
55- # Kubernetes
5655 - pkg : k8s.io/api/core/v1
5756 alias : corev1
5857 - pkg : k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
@@ -65,22 +64,21 @@ linters-settings:
6564 alias : utilruntime
6665 - pkg : k8s.io/client-go/kubernetes/scheme
6766 alias : clientgoscheme
68- # Rancher Turtles
6967 - pkg : github.com/rancher/turtles/util/naming
7068 alias : turtlesnaming
7169 - pkg : github.com/rancher/turtles/api/rancher/provisioning/v1
7270 alias : provisioningv1
7371 - pkg : github.com/rancher/turtles/api/rancher/management/v3
7472 alias : managementv3
75- # Controller Runtime
7673 - pkg : sigs.k8s.io/controller-runtime
7774 alias : ctrl
78- # CAPI
7975 - pkg : sigs.k8s.io/cluster-api/api/v1beta1
8076 alias : clusterv1
81- revive :
77+ no-unaliased : true
78+ lll :
79+ line-length : 150
80+ revive :
8281 rules :
83- # The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
8482 - name : blank-imports
8583 - name : context-as-argument
8684 - name : context-keys-type
@@ -105,53 +103,70 @@ linters-settings:
105103 - name : unused-parameter
106104 - name : unreachable-code
107105 - name : redefines-builtin-id
108- #
109- # Rules in addition to the recommended configuration above.
110- #
111106 - name : bool-literal-in-expr
112107 - name : constant-logical-expr
113- goheader :
114- values :
115- regexp :
116- copyright_regex : " Copyright © (\\ d{4})(?: - (\\ d{4}))? SUSE LLC"
117- template : |-
118- {{copyright_regex}}
119-
120- Licensed under the Apache License, Version 2.0 (the "License");
121- you may not use this file except in compliance with the License.
122- You may obtain a copy of the License at
123-
124- http://www.apache.org/licenses/LICENSE-2.0
125-
126- Unless required by applicable law or agreed to in writing, software
127- distributed under the License is distributed on an "AS IS" BASIS,
128- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
129- See the License for the specific language governing permissions and
130- limitations under the License.
131- linters :
132- enable-all : true
133- disable :
134- - nolintlint
135- - tagliatelle
136- - exhaustruct
137- - exhaustive
138- - funlen
139- - wrapcheck
140- - goerr113
141- - paralleltest
142- - varnamelen
143- - cyclop
144- - gochecknoglobals
145- - gochecknoinits
146- - nonamedreturns
147- - gocritic
148- - nlreturn
149- - mnd
150- - ireturn
151- - depguard
152- - containedctx
153- - godox
154- # Disabled because of generics
155- - rowserrcheck
156- - sqlclosecheck
157- - wastedassign
108+ exclusions :
109+ generated : lax
110+ presets :
111+ - common-false-positives
112+ - legacy
113+ - std-error-handling
114+ rules :
115+ - linters :
116+ - gochecknoglobals
117+ - testpackage
118+ path : _test\.go
119+ - linters :
120+ - dupl
121+ path : internal/controllers/import_controller(_v3)?\.go
122+ - linters :
123+ - dupl
124+ path : exp/day2/controllers/.*.go
125+ - linters :
126+ - revive
127+ text : var-naming
128+ - linters :
129+ - staticcheck
130+ text : ST1003
131+ - linters :
132+ - revive
133+ path : exp/day2/controllers/.*.go
134+ text : ' exported: exported method .*\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported'
135+ - linters :
136+ - unused
137+ path : exp/day2/controllers/.*.go
138+ - linters :
139+ - revive
140+ text : ' package-comments: should have a package comment'
141+ paths :
142+ - examples/examples.go
143+ - .*_test\.go$
144+ - third_party$
145+ - builtin$
146+ - examples$
147+ formatters :
148+ enable :
149+ - gci
150+ - gofmt
151+ - gofumpt
152+ - goimports
153+ settings :
154+ gci :
155+ sections :
156+ - standard
157+ - blank
158+ - dot
159+ - default
160+ - prefix(sigs.k8s.io/cluster-api)
161+ - prefix(github.com/rancher/turtles)
162+ custom-order : true
163+ goimports :
164+ local-prefixes :
165+ - github.com/rancher/turtles
166+ exclusions :
167+ generated : lax
168+ paths :
169+ - .*_test\.go$
170+ - third_party$
171+ - builtin$
172+ - examples$
0 commit comments