Skip to content

Commit

Permalink
Bump golangci-lint version
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Mazzotti <[email protected]>
  • Loading branch information
anmazzotti committed Feb 17, 2025
1 parent 9f5e274 commit 524c855
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 465 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
with:
go-version: '=1.23.0'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6.3.1
uses: golangci/golangci-lint-action@v6.5.2
with:
version: v1.60.2
version: v1.64.5
working-directory: ${{matrix.working-directory}}
args: --timeout=5m0s
skip-cache: true
24 changes: 0 additions & 24 deletions .github/workflows/lint.yaml

This file was deleted.

18 changes: 3 additions & 15 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Options for analysis running.
run:
go: "1.22"
skip-files:
- ".*_test\\.go$"
go: "1.23"
allow-parallel-runners: true
issues:
exclude-files:
- ".*_test\\.go$"
include:
- EXC0012
- EXC0014
Expand Down Expand Up @@ -137,8 +137,6 @@ linters:
- tagliatelle
- exhaustruct
- exhaustive
- exhaustivestruct
- maligned
- funlen
- wrapcheck
- goerr113
Expand All @@ -150,21 +148,11 @@ linters:
- nonamedreturns
- gocritic
- nlreturn
- gomnd
- mnd
- ireturn
- depguard
- containedctx
- godox
# The following are all deprecated linters
- deadcode
- ifshort
- varcheck
- scopelint
- interfacer
- structcheck
- golint
- nosnakecase
# Disabled because of generics
- rowserrcheck
- sqlclosecheck
Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ CLUSTERCTL_VER := v1.7.7
CLUSTERCTL_BIN := clusterctl
CLUSTERCTL := $(TOOLS_BIN_DIR)/$(CLUSTERCTL_BIN)-$(CLUSTERCTL_VER)

GOLANGCI_LINT_VER := v1.60.2
GOLANGCI_LINT_BIN := golangci-lint
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN))
GOLANGCI_LINT_VER := $(shell cat .github/workflows/golangci-lint.yaml | grep [[:space:]]version: | sed 's/.*version: //')
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER))
GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint

NOTES_BIN := notes
NOTES := $(abspath $(TOOLS_BIN_DIR)/$(NOTES_BIN))
Expand Down Expand Up @@ -505,10 +506,8 @@ $(UPDATECLI): # Install updatecli
cd ${TOOLS_BIN_DIR} && chmod +x updatecli
cd ${TOOLS_BIN_DIR} && mv updatecli $(UPDATECLI_BIN)-$(UPDATECLI_VER)

$(GOLANGCI_LINT): # Download and install golangci-lint
hack/ensure-golangci-lint.sh \
-b $(TOOLS_BIN_DIR) \
$(GOLANGCI_LINT_VER)
$(GOLANGCI_LINT): # Build golangci-lint from tools folder.
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(GOLANGCI_LINT_PKG) $(GOLANGCI_LINT_BIN) $(GOLANGCI_LINT_VER)

$(NOTES): # Download and install note generator from cluster-api commit
hack/make-release-notes.sh $(TOOLS_BIN_DIR)
Expand Down
Loading

0 comments on commit 524c855

Please sign in to comment.