Skip to content

Commit 6e8d414

Browse files
authored
chore: Enable nilerr, nilnesserr (#4346)
* chore: Enable nilerr, nilnesserr * Revert to return nil
1 parent ba7faec commit 6e8d414

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

‎.golangci.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ linters:
7272
- govet
7373
- loggercheck
7474
- misspell
75+
- nilerr
76+
- nilnesserr
7577
- nolintlint
7678
- perfsprint
7779
- revive

‎pkg/controller/admissionchecks/multikueue/multikueuecluster.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ func (c *clustersReconciler) Reconcile(ctx context.Context, req reconcile.Reques
400400

401401
if err != nil || !cluster.DeletionTimestamp.IsZero() {
402402
c.stopAndRemoveCluster(req.Name)
403-
return reconcile.Result{}, nil
403+
return reconcile.Result{}, nil //nolint:nilerr // nil is intentional, as either the cluster is deleted, or not found
404404
}
405405

406406
// get the kubeconfig

‎pkg/controller/jobs/jobset/jobset_controller.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (j *JobSet) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error {
144144
template := &j.Spec.ReplicatedJobs[index].Template.Spec.Template
145145
info := podSetsInfo[index]
146146
if err := podset.Merge(&template.ObjectMeta, &template.Spec, info); err != nil {
147-
return nil
147+
return err
148148
}
149149
}
150150
return nil

0 commit comments

Comments
 (0)