Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump golangci-lint version #1081

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.0
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.

20 changes: 3 additions & 17 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 @@ -49,8 +49,6 @@ linters-settings:
- "default"
- "prefix(sigs.k8s.io/cluster-api)"
- "prefix(github.com/rancher/turtles)"
wsl:
force-err-cuddling: false
importas:
no-unaliased: true
alias:
Expand Down Expand Up @@ -137,8 +135,6 @@ linters:
- tagliatelle
- exhaustruct
- exhaustive
- exhaustivestruct
- maligned
- funlen
- wrapcheck
- goerr113
Expand All @@ -150,21 +146,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
Loading