Skip to content

Commit 16127b1

Browse files
Bump github.com/golangci/golangci-lint from 1.52.2 to 1.53.2 in /hack/tools (#1258)
Signed-off-by: Prajyot-Parab <[email protected]>
1 parent 669ef47 commit 16127b1

File tree

7 files changed

+138
-122
lines changed

7 files changed

+138
-122
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ linters:
66
- bodyclose
77
- containedctx
88
- decorder
9-
- depguard
109
- dogsled
1110
- errcheck
1211
- errchkjson

cloud/scope/powervs_cluster.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ func NewPowerVSClusterScope(params PowerVSClusterScopeParams) (scope *PowerVSClu
7272

7373
if params.Client == nil {
7474
err = errors.New("failed to generate new scope from nil Client")
75-
return
75+
return nil, err
7676
}
7777
scope.Client = params.Client
7878

7979
if params.Cluster == nil {
8080
err = errors.New("failed to generate new scope from nil Cluster")
81-
return
81+
return nil, err
8282
}
8383
scope.Cluster = params.Cluster
8484

8585
if params.IBMPowerVSCluster == nil {
8686
err = errors.New("failed to generate new scope from nil IBMPowerVSCluster")
87-
return
87+
return nil, err
8888
}
8989
scope.IBMPowerVSCluster = params.IBMPowerVSCluster
9090

@@ -96,15 +96,15 @@ func NewPowerVSClusterScope(params PowerVSClusterScopeParams) (scope *PowerVSClu
9696
helper, err := patch.NewHelper(params.IBMPowerVSCluster, params.Client)
9797
if err != nil {
9898
err = errors.Wrap(err, "failed to init patch helper")
99-
return
99+
return nil, err
100100
}
101101
scope.patchHelper = helper
102102

103103
spec := params.IBMPowerVSCluster.Spec
104104

105105
rc, err := resourcecontroller.NewService(resourcecontroller.ServiceOptions{})
106106
if err != nil {
107-
return
107+
return nil, err
108108
}
109109

110110
// Fetch the resource controller endpoint.
@@ -121,7 +121,7 @@ func NewPowerVSClusterScope(params PowerVSClusterScopeParams) (scope *PowerVSClu
121121
})
122122
if err != nil {
123123
err = errors.Wrap(err, "failed to get resource instance")
124-
return
124+
return nil, err
125125
}
126126

127127
options := powervs.ServiceOptions{
@@ -141,7 +141,7 @@ func NewPowerVSClusterScope(params PowerVSClusterScopeParams) (scope *PowerVSClu
141141
c, err := powervs.NewService(options)
142142
if err != nil {
143143
err = fmt.Errorf("failed to create NewIBMPowerVSClient")
144-
return
144+
return nil, err
145145
}
146146
scope.IBMPowerVSClient = c
147147

cloud/scope/powervs_image.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ func NewPowerVSImageScope(params PowerVSImageScopeParams) (scope *PowerVSImageSc
6969

7070
if params.Client == nil {
7171
err = errors.New("failed to generate new scope from nil Client")
72-
return
72+
return nil, err
7373
}
7474
scope.Client = params.Client
7575

7676
if params.IBMPowerVSImage == nil {
7777
err = errors.New("failed to generate new scope from nil IBMPowerVSImage")
78-
return
78+
return nil, err
7979
}
8080
scope.IBMPowerVSImage = params.IBMPowerVSImage
8181

@@ -87,15 +87,15 @@ func NewPowerVSImageScope(params PowerVSImageScopeParams) (scope *PowerVSImageSc
8787
helper, err := patch.NewHelper(params.IBMPowerVSImage, params.Client)
8888
if err != nil {
8989
err = errors.Wrap(err, "failed to init patch helper")
90-
return
90+
return nil, err
9191
}
9292
scope.patchHelper = helper
9393

9494
spec := params.IBMPowerVSImage.Spec
9595

9696
rc, err := resourcecontroller.NewService(resourcecontroller.ServiceOptions{})
9797
if err != nil {
98-
return
98+
return nil, err
9999
}
100100

101101
// Fetch the resource controller endpoint.
@@ -112,7 +112,7 @@ func NewPowerVSImageScope(params PowerVSImageScopeParams) (scope *PowerVSImageSc
112112
})
113113
if err != nil {
114114
err = errors.Wrap(err, "failed to get resource instance")
115-
return
115+
return nil, err
116116
}
117117

118118
options := powervs.ServiceOptions{
@@ -132,7 +132,7 @@ func NewPowerVSImageScope(params PowerVSImageScopeParams) (scope *PowerVSImageSc
132132
c, err := powervs.NewService(options)
133133
if err != nil {
134134
err = fmt.Errorf("failed to create NewIBMPowerVSClient")
135-
return
135+
return nil, err
136136
}
137137
scope.IBMPowerVSClient = c
138138

cloud/scope/powervs_machine.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,25 @@ func NewPowerVSMachineScope(params PowerVSMachineScopeParams) (scope *PowerVSMac
9090

9191
if params.Client == nil {
9292
err = errors.New("client is required when creating a MachineScope")
93-
return
93+
return nil, err
9494
}
9595
scope.Client = params.Client
9696

9797
if params.Machine == nil {
9898
err = errors.New("machine is required when creating a MachineScope")
99-
return
99+
return nil, err
100100
}
101101
scope.Machine = params.Machine
102102

103103
if params.Cluster == nil {
104104
err = errors.New("cluster is required when creating a MachineScope")
105-
return
105+
return nil, err
106106
}
107107
scope.Cluster = params.Cluster
108108

109109
if params.IBMPowerVSMachine == nil {
110110
err = errors.New("PowerVS machine is required when creating a MachineScope")
111-
return
111+
return nil, err
112112
}
113113
scope.IBMPowerVSMachine = params.IBMPowerVSMachine
114114
scope.IBMPowerVSCluster = params.IBMPowerVSCluster
@@ -122,15 +122,15 @@ func NewPowerVSMachineScope(params PowerVSMachineScopeParams) (scope *PowerVSMac
122122
helper, err := patch.NewHelper(params.IBMPowerVSMachine, params.Client)
123123
if err != nil {
124124
err = errors.Wrap(err, "failed to init patch helper")
125-
return
125+
return nil, err
126126
}
127127
scope.patchHelper = helper
128128

129129
m := params.IBMPowerVSMachine
130130

131131
rc, err := resourcecontroller.NewService(resourcecontroller.ServiceOptions{})
132132
if err != nil {
133-
return
133+
return nil, err
134134
}
135135

136136
// Fetch the resource controller endpoint.
@@ -147,7 +147,7 @@ func NewPowerVSMachineScope(params PowerVSMachineScopeParams) (scope *PowerVSMac
147147
})
148148
if err != nil {
149149
err = errors.Wrap(err, "failed to get resource instance")
150-
return
150+
return nil, err
151151
}
152152

153153
region := endpoints.CostructRegionFromZone(*res.RegionID)
@@ -171,7 +171,7 @@ func NewPowerVSMachineScope(params PowerVSMachineScopeParams) (scope *PowerVSMac
171171
c, err := powervs.NewService(serviceOptions)
172172
if err != nil {
173173
err = fmt.Errorf("failed to create PowerVS service")
174-
return
174+
return nil, err
175175
}
176176
scope.IBMPowerVSClient = c
177177
scope.DHCPIPCacheStore = params.DHCPIPCacheStore

controllers/ibmpowervscluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (r *IBMPowerVSClusterReconciler) Reconcile(ctx context.Context, req ctrl.Re
106106
return r.reconcile(clusterScope), nil
107107
}
108108

109-
func (r *IBMPowerVSClusterReconciler) reconcile(clusterScope *scope.PowerVSClusterScope) ctrl.Result {
109+
func (r *IBMPowerVSClusterReconciler) reconcile(clusterScope *scope.PowerVSClusterScope) ctrl.Result { //nolint:unparam
110110
if !controllerutil.ContainsFinalizer(clusterScope.IBMPowerVSCluster, infrav1beta2.IBMPowerVSClusterFinalizer) {
111111
controllerutil.AddFinalizer(clusterScope.IBMPowerVSCluster, infrav1beta2.IBMPowerVSClusterFinalizer)
112112
return ctrl.Result{}

hack/tools/go.mod

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.4.2
77
require (
88
github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46
99
github.com/golang/mock v1.6.0
10-
github.com/golangci/golangci-lint v1.52.2
10+
github.com/golangci/golangci-lint v1.53.2
1111
github.com/itchyny/gojq v0.12.13
1212
github.com/joelanford/go-apidiff v0.5.0
13-
github.com/onsi/ginkgo/v2 v2.9.2
13+
github.com/onsi/ginkgo/v2 v2.9.4
1414
gotest.tools/gotestsum v1.10.0
1515
k8s.io/code-generator v0.26.1
1616
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20230502145015-7b92ce4577e3
@@ -22,17 +22,19 @@ require (
2222
require (
2323
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
2424
4d63.com/gochecknoglobals v0.2.1 // indirect
25+
github.com/4meepo/tagalign v1.2.2 // indirect
2526
github.com/Abirdcfly/dupword v0.0.11 // indirect
26-
github.com/Antonboom/errname v0.1.9 // indirect
27-
github.com/Antonboom/nilnil v0.1.3 // indirect
28-
github.com/BurntSushi/toml v1.2.1 // indirect
27+
github.com/Antonboom/errname v0.1.10 // indirect
28+
github.com/Antonboom/nilnil v0.1.5 // indirect
29+
github.com/BurntSushi/toml v1.3.0 // indirect
2930
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
3031
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
3132
github.com/Masterminds/semver v1.5.0 // indirect
3233
github.com/Microsoft/go-winio v0.5.2 // indirect
33-
github.com/OpenPeeDeeP/depguard v1.1.1 // indirect
34+
github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect
3435
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
3536
github.com/acomagu/bufpipe v1.0.3 // indirect
37+
github.com/alexkohler/nakedret/v2 v2.0.1 // indirect
3638
github.com/alexkohler/prealloc v1.0.0 // indirect
3739
github.com/alingse/asasalint v0.0.11 // indirect
3840
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
@@ -45,7 +47,8 @@ require (
4547
github.com/bombsimon/wsl/v3 v3.4.0 // indirect
4648
github.com/breml/bidichk v0.2.4 // indirect
4749
github.com/breml/errchkjson v0.3.1 // indirect
48-
github.com/butuzov/ireturn v0.1.1 // indirect
50+
github.com/butuzov/ireturn v0.2.0 // indirect
51+
github.com/butuzov/mirror v1.1.0 // indirect
4952
github.com/cespare/xxhash/v2 v2.1.2 // indirect
5053
github.com/charithe/durationcheck v0.0.10 // indirect
5154
github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect
@@ -63,12 +66,12 @@ require (
6366
github.com/firefart/nonamedreturns v1.0.4 // indirect
6467
github.com/fsnotify/fsnotify v1.6.0 // indirect
6568
github.com/fzipp/gocyclo v0.6.0 // indirect
66-
github.com/go-critic/go-critic v0.7.0 // indirect
69+
github.com/go-critic/go-critic v0.8.1 // indirect
6770
github.com/go-errors/errors v1.0.1 // indirect
6871
github.com/go-git/gcfg v1.5.0 // indirect
6972
github.com/go-git/go-billy/v5 v5.3.1 // indirect
7073
github.com/go-git/go-git/v5 v5.4.2 // indirect
71-
github.com/go-logr/logr v1.2.3 // indirect
74+
github.com/go-logr/logr v1.2.4 // indirect
7275
github.com/go-logr/zapr v1.2.3 // indirect
7376
github.com/go-openapi/jsonpointer v0.19.5 // indirect
7477
github.com/go-openapi/jsonreference v0.20.0 // indirect
@@ -112,7 +115,7 @@ require (
112115
github.com/hashicorp/hcl v1.0.0 // indirect
113116
github.com/hexops/gotextdiff v1.0.3 // indirect
114117
github.com/imdario/mergo v0.3.13 // indirect
115-
github.com/inconshreveable/mousetrap v1.0.1 // indirect
118+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
116119
github.com/itchyny/timefmt-go v0.1.5 // indirect
117120
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
118121
github.com/jgautheron/goconst v1.5.1 // indirect
@@ -121,16 +124,15 @@ require (
121124
github.com/josharian/intern v1.0.0 // indirect
122125
github.com/json-iterator/go v1.1.12 // indirect
123126
github.com/julz/importas v0.1.0 // indirect
124-
github.com/junk1tm/musttag v0.5.0 // indirect
125127
github.com/kevinburke/ssh_config v1.1.0 // indirect
126128
github.com/kisielk/errcheck v1.6.3 // indirect
127129
github.com/kisielk/gotool v1.0.0 // indirect
128130
github.com/kkHAIKE/contextcheck v1.1.4 // indirect
129131
github.com/kulti/thelper v0.6.3 // indirect
130-
github.com/kunwardeep/paralleltest v1.0.6 // indirect
132+
github.com/kunwardeep/paralleltest v1.0.7 // indirect
131133
github.com/kyoh86/exportloopref v0.1.11 // indirect
132134
github.com/ldez/gomoddirectives v0.2.3 // indirect
133-
github.com/ldez/tagliatelle v0.4.0 // indirect
135+
github.com/ldez/tagliatelle v0.5.0 // indirect
134136
github.com/leonklingele/grouper v1.1.1 // indirect
135137
github.com/lufeee/execinquery v1.2.1 // indirect
136138
github.com/magiconair/properties v1.8.7 // indirect
@@ -143,7 +145,7 @@ require (
143145
github.com/mattn/go-runewidth v0.0.14 // indirect
144146
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
145147
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
146-
github.com/mgechev/revive v1.3.1 // indirect
148+
github.com/mgechev/revive v1.3.2 // indirect
147149
github.com/mitchellh/go-homedir v1.1.0 // indirect
148150
github.com/mitchellh/mapstructure v1.5.0 // indirect
149151
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -152,14 +154,14 @@ require (
152154
github.com/moricho/tparallel v0.3.1 // indirect
153155
github.com/nakabonne/nestif v0.3.1 // indirect
154156
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
155-
github.com/nishanths/exhaustive v0.9.5 // indirect
157+
github.com/nishanths/exhaustive v0.10.0 // indirect
156158
github.com/nishanths/predeclared v0.2.2 // indirect
157-
github.com/nunnatsa/ginkgolinter v0.9.0 // indirect
159+
github.com/nunnatsa/ginkgolinter v0.12.0 // indirect
158160
github.com/olekukonko/tablewriter v0.0.5 // indirect
159161
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
160162
github.com/pkg/errors v0.9.1 // indirect
161163
github.com/pmezard/go-difflib v1.0.0 // indirect
162-
github.com/polyfloyd/go-errorlint v1.4.0 // indirect
164+
github.com/polyfloyd/go-errorlint v1.4.2 // indirect
163165
github.com/prometheus/client_golang v1.14.0 // indirect
164166
github.com/prometheus/client_model v0.3.0 // indirect
165167
github.com/prometheus/common v0.37.0 // indirect
@@ -174,56 +176,59 @@ require (
174176
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
175177
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
176178
github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect
177-
github.com/securego/gosec/v2 v2.15.0 // indirect
179+
github.com/securego/gosec/v2 v2.16.0 // indirect
178180
github.com/sergi/go-diff v1.2.0 // indirect
179181
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
180-
github.com/sirupsen/logrus v1.9.0 // indirect
181-
github.com/sivchari/containedctx v1.0.2 // indirect
182+
github.com/sirupsen/logrus v1.9.2 // indirect
183+
github.com/sivchari/containedctx v1.0.3 // indirect
182184
github.com/sivchari/nosnakecase v1.7.0 // indirect
183185
github.com/sivchari/tenv v1.7.1 // indirect
184186
github.com/sonatard/noctx v0.0.2 // indirect
185187
github.com/sourcegraph/go-diff v0.7.0 // indirect
186188
github.com/spf13/afero v1.9.3 // indirect
187189
github.com/spf13/cast v1.5.0 // indirect
188-
github.com/spf13/cobra v1.6.1 // indirect
190+
github.com/spf13/cobra v1.7.0 // indirect
189191
github.com/spf13/jwalterweatherman v1.1.0 // indirect
190192
github.com/spf13/pflag v1.0.5 // indirect
191193
github.com/spf13/viper v1.15.0 // indirect
192194
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
193195
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
194196
github.com/stretchr/objx v0.5.0 // indirect
195-
github.com/stretchr/testify v1.8.2 // indirect
197+
github.com/stretchr/testify v1.8.4 // indirect
196198
github.com/subosito/gotenv v1.4.2 // indirect
197199
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
198200
github.com/tdakkota/asciicheck v0.2.0 // indirect
199201
github.com/tetafro/godot v1.4.11 // indirect
200-
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e // indirect
202+
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
201203
github.com/timonwong/loggercheck v0.9.4 // indirect
202204
github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect
203205
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
204206
github.com/ultraware/funlen v0.0.3 // indirect
205207
github.com/ultraware/whitespace v0.0.5 // indirect
206208
github.com/uudashr/gocognit v1.0.6 // indirect
207209
github.com/xanzy/ssh-agent v0.3.0 // indirect
210+
github.com/xen0n/gosmopolitan v1.2.1 // indirect
208211
github.com/xlab/treeprint v1.1.0 // indirect
209212
github.com/yagipy/maintidx v1.0.0 // indirect
210213
github.com/yeya24/promlinter v0.2.0 // indirect
214+
github.com/ykadowak/zerologlint v0.1.1 // indirect
211215
gitlab.com/bosi/decorder v0.2.3 // indirect
212216
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
217+
go.tmz.dev/musttag v0.7.0 // indirect
213218
go.uber.org/atomic v1.9.0 // indirect
214219
go.uber.org/goleak v1.1.12 // indirect
215220
go.uber.org/multierr v1.8.0 // indirect
216221
go.uber.org/zap v1.24.0 // indirect
217-
golang.org/x/crypto v0.5.0 // indirect
218-
golang.org/x/exp v0.0.0-20220921164117-439092de6870 // indirect
222+
golang.org/x/crypto v0.9.0 // indirect
223+
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
219224
golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect
220-
golang.org/x/mod v0.9.0 // indirect
221-
golang.org/x/net v0.8.0 // indirect
222-
golang.org/x/sync v0.1.0 // indirect
225+
golang.org/x/mod v0.10.0 // indirect
226+
golang.org/x/net v0.10.0 // indirect
227+
golang.org/x/sync v0.2.0 // indirect
223228
golang.org/x/sys v0.8.0 // indirect
224-
golang.org/x/term v0.6.0 // indirect
225-
golang.org/x/text v0.8.0 // indirect
226-
golang.org/x/tools v0.7.0 // indirect
229+
golang.org/x/term v0.8.0 // indirect
230+
golang.org/x/text v0.9.0 // indirect
231+
golang.org/x/tools v0.9.3 // indirect
227232
google.golang.org/protobuf v1.28.1 // indirect
228233
gopkg.in/inf.v0 v0.9.1 // indirect
229234
gopkg.in/ini.v1 v1.67.0 // indirect
@@ -238,7 +243,7 @@ require (
238243
k8s.io/klog/v2 v2.80.1 // indirect
239244
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
240245
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
241-
mvdan.cc/gofumpt v0.4.0 // indirect
246+
mvdan.cc/gofumpt v0.5.0 // indirect
242247
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
243248
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
244249
mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect

0 commit comments

Comments
 (0)