Skip to content

Commit

Permalink
Update dependency golangci/golangci-lint to v1.60.3 (#328)
Browse files Browse the repository at this point in the history
* Update dependency golangci/golangci-lint to v1.60.3

* Use new `copyloopvar` linter

* Silence new warnings

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tim Ebert <[email protected]>
  • Loading branch information
renovate[bot] and timebertt authored Aug 27, 2024
1 parent 94b90c6 commit 21b9734
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run:

linters:
enable:
- exportloopref
- copyloopvar
- ginkgolinter
- gocritic
- gosec
Expand Down
2 changes: 1 addition & 1 deletion hack/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $(GINKGO): $(call tool_version_file,$(GINKGO),$(GINKGO_VERSION))

GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint
# renovate: datasource=github-releases depName=golangci/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.60.1
GOLANGCI_LINT_VERSION ?= v1.60.3
$(GOLANGCI_LINT): $(call tool_version_file,$(GOLANGCI_LINT),$(GOLANGCI_LINT_VERSION))
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TOOLS_BIN_DIR) $(GOLANGCI_LINT_VERSION)

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/clusterring/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reco
}

shards := leases.ToShards(leaseList.Items, r.Clock.Now())
clusterRing.Status.Shards = int32(len(shards))
clusterRing.Status.AvailableShards = int32(len(shards.AvailableShards()))
clusterRing.Status.Shards = int32(len(shards)) // nolint:gosec
clusterRing.Status.AvailableShards = int32(len(shards.AvailableShards())) // nolint:gosec

// update status if necessary
return reconcile.Result{}, r.updateStatusSuccess(ctx, clusterRing, before)
Expand Down

0 comments on commit 21b9734

Please sign in to comment.