Skip to content

Commit 24f5e51

Browse files
authored
chore(golangci-lint): add golangci-lint step for registry-scanner submodule; bump golangci-lint from 2.1.6 to 2.5.0 (#1275)
Signed-off-by: Cheng Fang <[email protected]>
1 parent dcd8f7d commit 24f5e51

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/ci-tests.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,19 @@ jobs:
6565
uses: actions/setup-go@v6
6666
with:
6767
go-version-file: go.mod
68-
cache: false
6968
env:
7069
GO111MODULE: off
71-
- name: Run golangci-lint
70+
- name: Run golangci-lint on main module
7271
uses: golangci/golangci-lint-action@v8
7372
with:
74-
version: v2.1.6
73+
version: v2.5.0
7574
args: --timeout 5m
75+
- name: Run golangci-lint on registry-scanner
76+
uses: golangci/golangci-lint-action@v8
77+
with:
78+
version: v2.5.0
79+
args: --timeout 5m
80+
working-directory: registry-scanner
7681
test:
7782
name: Ensure unit tests are passing
7883
runs-on: ubuntu-latest

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
221221
KUSTOMIZE_VERSION ?= v5.4.3
222222
CONTROLLER_TOOLS_VERSION ?= v0.16.1
223223
ENVTEST_VERSION ?= release-0.19
224-
GOLANGCI_LINT_VERSION ?= v1.59.1
224+
GOLANGCI_LINT_VERSION ?= v2.5.0
225225

226226
.PHONY: kustomize
227227
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
@@ -241,7 +241,7 @@ $(ENVTEST): $(LOCALBIN)
241241
.PHONY: golangci-lint
242242
golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
243243
$(GOLANGCI_LINT): $(LOCALBIN)
244-
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
244+
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
245245

246246
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
247247
# $1 - target path with name of binary

0 commit comments

Comments
 (0)