Merge pull request #4850 from afbjorklund/lint-jobs

Limit the number of golangci-lint jobs to one
pull/4719/head
Anders Björklund 2019-07-23 17:32:32 +02:00 committed by GitHub
commit 65dd2d0d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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 \