提交 bb5736b0 编写于 作者: A Anders F Björklund

Limit the number of golangci-lint jobs to one

If you want the old behaviour back, use:
e.g. make lint GOLINT_JOBS=`nproc`

Running multiple linters takes a lot of RAM.
And it only saves us like 15 seconds anyway ?
上级 e22b605e
......@@ -47,6 +47,8 @@ KERNEL_VERSION ?= 4.16.14
GO_VERSION ?= $(shell go version | cut -d' ' -f3 | sed -e 's/go//')
GOLINT_VERSION ?= v1.17.1
# Limit number of default jobs, to avoid the CI builds running out of memory
GOLINT_JOBS ?= 1
export GO111MODULE := on
GOOS ?= $(shell go env GOOS)
......@@ -276,6 +278,7 @@ out/linters/golangci-lint:
.PHONY: lint
lint: pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go out/linters/golangci-lint
./out/linters/golangci-lint run \
--concurrency ${GOLINT_JOBS} \
--deadline 4m \
--build-tags "${MINIKUBE_INTEGRATION_BUILD_TAGS}" \
--enable goimports,gocritic,golint,gocyclo,interfacer,misspell,nakedret,stylecheck,unconvert,unparam \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册