Merge pull request #4850 from afbjorklund/lint-jobs
Limit the number of golangci-lint jobs to onepull/4719/head
commit
65dd2d0d6a
8
Makefile
8
Makefile
|
|
@ -47,6 +47,11 @@ 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
|
||||
# see https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
|
||||
GOLINT_GOGC ?= 10
|
||||
|
||||
export GO111MODULE := on
|
||||
|
||||
GOOS ?= $(shell go env GOOS)
|
||||
|
|
@ -275,7 +280,8 @@ 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 \
|
||||
GOGC=${GOLINT_GOGC} ./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 \
|
||||
|
|
|
|||
Loading…
Reference in New Issue