Skip to content

Commit

Permalink
Bump golangci-lint to v1.60.1
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Pavlov <[email protected]>
  • Loading branch information
Kshatrix committed Aug 15, 2024
1 parent cb0a701 commit 7b04cdd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ test-e2e:

.PHONY: lint
lint: golangci-lint ## Run golangci-lint linter & yamllint
$(GOLANGCI_LINT) run
@$(GOLANGCI_LINT) run

.PHONY: lint-fix
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
$(GOLANGCI_LINT) run --fix
@$(GOLANGCI_LINT) run --fix

.PHONY: add-license
add-license: addlicense
Expand Down Expand Up @@ -317,7 +317,7 @@ ADDLICENSE ?= $(LOCALBIN)/addlicense-$(ADDLICENSE_VERSION)
## Tool Versions
CONTROLLER_TOOLS_VERSION ?= v0.14.0
ENVTEST_VERSION ?= release-0.17
GOLANGCI_LINT_VERSION ?= v1.57.2
GOLANGCI_LINT_VERSION ?= v1.60.1
HELM_VERSION ?= v3.15.1
KIND_VERSION ?= v0.23.0
YQ_VERSION ?= v4.44.2
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (r *DeploymentReconciler) Update(ctx context.Context, l logr.Logger, deploy
Reason: hmc.FailedReason,
Message: errMsg,
})
return ctrl.Result{}, fmt.Errorf(errMsg)
return ctrl.Result{}, errors.New(errMsg)
}
if !template.Status.Valid {
errMsg := "provided template is not marked as valid"
Expand All @@ -139,7 +139,7 @@ func (r *DeploymentReconciler) Update(ctx context.Context, l logr.Logger, deploy
Reason: hmc.FailedReason,
Message: errMsg,
})
return ctrl.Result{}, fmt.Errorf(errMsg)
return ctrl.Result{}, errors.New(errMsg)
}
apimeta.SetStatusCondition(deployment.GetConditions(), metav1.Condition{
Type: hmc.TemplateReadyCondition,
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/management_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ func (r *ManagementReconciler) Update(ctx context.Context, management *hmc.Manag
if err != nil {
errMsg := fmt.Sprintf("Failed to get Template %s/%s: %s", hmc.TemplatesNamespace, component.Template, err)
updateComponentsStatus(detectedComponents, &detectedProviders, component.Template, template.Status, errMsg)
errs = errors.Join(fmt.Errorf(errMsg))
errs = errors.Join(errors.New(errMsg))
continue
}
if !template.Status.Valid {
errMsg := fmt.Sprintf("Template %s/%s is not marked as valid", hmc.TemplatesNamespace, component.Template)
updateComponentsStatus(detectedComponents, &detectedProviders, component.Template, template.Status, errMsg)
errs = errors.Join(fmt.Errorf(errMsg))
errs = errors.Join(errors.New(errMsg))
continue
}

Expand All @@ -122,7 +122,7 @@ func (r *ManagementReconciler) Update(ctx context.Context, management *hmc.Manag
if err != nil {
errMsg := fmt.Sprintf("error reconciling HelmRelease %s/%s: %s", management.Namespace, component.Template, err)
updateComponentsStatus(detectedComponents, &detectedProviders, component.Template, template.Status, errMsg)
errs = errors.Join(fmt.Errorf(errMsg))
errs = errors.Join(errors.New(errMsg))
continue
}
updateComponentsStatus(detectedComponents, &detectedProviders, component.Template, template.Status, "")
Expand Down

0 comments on commit 7b04cdd

Please sign in to comment.