diff --git a/.golangci.yml b/.golangci.yml index 5f0d58c..723deb1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,10 +2,6 @@ run: # timeout for analysis deadline: 4m - # Linting uses a lot of memory. Keep it under control by only running a single - # worker. - concurrency: 1 - linters-settings: govet: # Don't report about shadowed variables diff --git a/Makefile b/Makefile index cfcf1c1..752d274 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,13 @@ XARGS := xargs -L 1 include make/testing_flags.mk -LINT = $(LINT_BIN) run -v +# Linting uses a lot of memory, so keep it under control by limiting the number +# of workers if requested. +ifneq ($(workers),) +LINT_WORKERS = --concurrency=$(workers) +endif + +LINT = $(LINT_BIN) run -v $(LINT_WORKERS) GREEN := "\\033[0;32m" NC := "\\033[0m"