Skip to content

Commit 392b7b9

Browse files
committed
Bump to golangci-lint v1.60.2
1 parent cfe417d commit 392b7b9

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

.github/workflows/pr-golangci-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
- name: golangci-lint
3131
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # tag=v6.1.1
3232
with:
33-
version: v1.59.0
33+
version: v1.60.2
3434
args: --out-format=colored-line-number
3535
working-directory: ${{matrix.working-directory}}

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ linters:
5757
- whitespace
5858

5959
linters-settings:
60+
gosec:
61+
excludes:
62+
# integer overflow conversion int -> int32
63+
- G115
6064
gci:
6165
sections:
6266
- standard # Standard section: captures all standard packages.
@@ -324,3 +328,6 @@ issues:
324328
- stylecheck
325329
text: ST1021|ST1020
326330
path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$
331+
- linters:
332+
- govet
333+
text: "non-constant format string in call to sigs\\.k8s\\.io\\/cluster-api\\/util\\/conditions\\."

controllers/vspherecluster_reconciler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ func (r *clusterReconciler) reconcileDelete(ctx context.Context, clusterCtx *cap
165165
if ctrlutil.RemoveFinalizer(secret, infrav1.SecretIdentitySetFinalizer) {
166166
log.Info(fmt.Sprintf("Removing finalizer %s", infrav1.SecretIdentitySetFinalizer), "Secret", klog.KObj(secret))
167167
if err := r.Client.Update(ctx, secret); err != nil {
168-
return reconcile.Result{}, pkgerrors.Wrapf(err, fmt.Sprintf("failed to update Secret %s", klog.KObj(secret)))
168+
return reconcile.Result{}, pkgerrors.Wrapf(err, "failed to update Secret %s", klog.KObj(secret))
169169
}
170170
}
171171

172172
if secret.DeletionTimestamp.IsZero() {
173173
log.Info("Deleting Secret", "Secret", klog.KObj(secret))
174174
if err := r.Client.Delete(ctx, secret); err != nil {
175-
return reconcile.Result{}, pkgerrors.Wrapf(err, fmt.Sprintf("failed to delete Secret %s", klog.KObj(secret)))
175+
return reconcile.Result{}, pkgerrors.Wrapf(err, "failed to delete Secret %s", klog.KObj(secret))
176176
}
177177
}
178178
}

controllers/vsphereclusteridentity_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ func (r clusterIdentityReconciler) reconcileDelete(ctx context.Context, identity
174174
if ctrlutil.RemoveFinalizer(secret, infrav1.SecretIdentitySetFinalizer) {
175175
log.Info(fmt.Sprintf("Removing finalizer %s", infrav1.SecretIdentitySetFinalizer), "Secret", klog.KObj(secret))
176176
if err := r.Client.Update(ctx, secret); err != nil {
177-
return errors.Wrapf(err, fmt.Sprintf("failed to update Secret %s", klog.KObj(secret)))
177+
return errors.Wrapf(err, "failed to update Secret %s", klog.KObj(secret))
178178
}
179179
}
180180

181181
if secret.DeletionTimestamp.IsZero() {
182182
log.Info("Deleting Secret", "Secret", klog.KObj(secret))
183183
if err := r.Client.Delete(ctx, secret); err != nil {
184-
return errors.Wrapf(err, fmt.Sprintf("failed to delete Secret %s", klog.KObj(secret)))
184+
return errors.Wrapf(err, "failed to delete Secret %s", klog.KObj(secret))
185185
}
186186
}
187187

controllers/vspherevm_ipaddress_reconciler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ func (r vmReconciler) deleteIPAddressClaims(ctx context.Context, vmCtx *capvcont
199199
if apierrors.IsNotFound(err) {
200200
continue
201201
}
202-
return errors.Wrapf(err, fmt.Sprintf("failed to get IPAddressClaim %q to remove the finalizer", ipAddrClaimName))
202+
return errors.Wrapf(err, "failed to get IPAddressClaim %q to remove the finalizer", ipAddrClaimName)
203203
}
204204

205205
if ctrlutil.RemoveFinalizer(ipAddrClaim, infrav1.IPAddressClaimFinalizer) {
206206
log.Info(fmt.Sprintf("Removing finalizer %s", infrav1.IPAddressClaimFinalizer), "IPAddressClaim", klog.KObj(ipAddrClaim))
207207
if err := vmCtx.Client.Update(ctx, ipAddrClaim); err != nil {
208-
return errors.Wrapf(err, fmt.Sprintf("failed to update IPAddressClaim %s", klog.KObj(ipAddrClaim)))
208+
return errors.Wrapf(err, "failed to update IPAddressClaim %s", klog.KObj(ipAddrClaim))
209209
}
210210
}
211211
}

test/framework/log/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func newSSHConfig() (*ssh.ClientConfig, error) {
219219

220220
signer, err := ssh.ParsePrivateKey(sshPrivateKeyContent)
221221
if err != nil {
222-
return nil, errors.Wrapf(err, fmt.Sprintf("error parsing private key: %s", sshPrivateKeyContent))
222+
return nil, errors.Wrapf(err, "error parsing private key: %s", sshPrivateKeyContent)
223223
}
224224

225225
config := &ssh.ClientConfig{

0 commit comments

Comments
 (0)