Skip to content
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
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ MINIKUBE_RELEASES_URL=https://github.com/kubernetes/minikube/releases/download

# latest from https://github.com/golangci/golangci-lint/releases
# update this only by running `make update-golint-version`
GOLINT_VERSION ?= v2.1.6
GOLINT_VERSION ?= v2.6.2
# see https://golangci-lint.run/docs/configuration/file/ for config details
GOLINT_CONFIG ?= .golangci.yaml
GOLINT_CONFIG ?= .golangci.min.yaml
# Set this to --verbose to see details about the linters and formatters used
GOLINT_VERBOSE ?=
# Limit number of default jobs, to avoid the CI builds running out of memory
Expand Down Expand Up @@ -523,15 +523,16 @@ out/linters/golangci-lint-$(GOLINT_VERSION):
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
lint:
docker run --rm -v `pwd`:/app:Z -w /app golangci/golangci-lint:$(GOLINT_VERSION) \
golangci-lint run ${GOLINT_OPTIONS} ./..."
# --skip-dirs "cmd/drivers/kvm|cmd/drivers/hyperkit|pkg/drivers/kvm|pkg/drivers/hyperkit"
# The "--skip-dirs" parameter is no longer supported in the V2 version. If you need to skip the directory,
# add it under "linters.settings.exclusions.paths" in the ".golangci.yaml" file.
./out/linters/golangci-lint-$(GOLINT_VERSION) run ${GOLINT_OPTIONS} ./...
else
lint: out/linters/golangci-lint-$(GOLINT_VERSION) ## Run lint
./out/linters/golangci-lint-$(GOLINT_VERSION) run ${GOLINT_OPTIONS} ./...
endif

.PHONY: lint-max
lint-max: out/linters/golangci-lint-$(GOLINT_VERSION) ## Run lint
./out/linters/golangci-lint-$(GOLINT_VERSION) run ${GOLINT_OPTIONS} --config .golangci.max.yaml ./...

# lint-ci is slower version of lint and is meant to be used in ci (travis) to avoid out of memory leaks.
.PHONY: lint-ci
lint-ci: out/linters/golangci-lint-$(GOLINT_VERSION) ## Run lint-ci
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module k8s.io/minikube

go 1.24.0

toolchain go1.24.1

require (
cloud.google.com/go/storage v1.56.1
github.com/Delta456/box-cli-maker/v2 v2.3.0
Expand Down
2 changes: 0 additions & 2 deletions hack/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module k8s.io/minikube/hack

go 1.24.0

toolchain go1.24.1

replace github.com/docker/machine => github.com/minikube-machine/machine v0.0.0-20240815173309-ffb6b643c381

require (
Expand Down
4 changes: 3 additions & 1 deletion hack/prow/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ function install_dependencies() {
brew install pstree coreutils pidof
ln -s /usr/local/bin/gtimeout /usr/local/bin/timeout || true
fi
# do NOT change manually - only using make update-golang-version
GOLANG_VERSION_TO_INSTALL="1.24.6"
# install golang if not present
sudo hack/prow/installer/check_install_golang.sh /usr/local 1.24.5 || true
sudo -E hack/prow/installer/check_install_golang.sh /usr/local $GOLANG_VERSION_TO_INSTALL || true
# install gotestsum if not present
GOROOT="/usr/local/go" hack/prow/installer/check_install_gotestsum.sh || true
# install gopogh
Expand Down
5 changes: 5 additions & 0 deletions hack/update/golang_version/golang_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ var (
`VERSION_TO_INSTALL=.*`: `VERSION_TO_INSTALL={{.StableVersion}}`,
},
},
"hack/prow/common.sh": {
Replace: map[string]string{
`GOLANG_VERSION_TO_INSTALL=.*`: `GOLANG_VERSION_TO_INSTALL={{.StableVersion}}`,
},
},
"hack/jenkins/installers/check_install_golang.ps1": {
Replace: map[string]string{
`GoVersion = ".*"`: `GoVersion = "{{.StableVersion}}"`,
Expand Down
2 changes: 1 addition & 1 deletion hack/update/golint_version/golint_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
schema = map[string]update.Item{
"Makefile": {
Replace: map[string]string{
`GOLINT_VERSION \?= v1.*`: `GOLINT_VERSION ?= {{.StableVersion}}`,
`GOLINT_VERSION \?= v2.*`: `GOLINT_VERSION ?= {{.StableVersion}}`,
},
},
}
Expand Down
Loading