From 35434666044fdd7cc772c7bbcb4f5071ef3a23b4 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 24 Jun 2020 09:58:17 +0200 Subject: [PATCH] Makefile+lint: only limit concurrency on Travis --- .golangci.yml | 4 ---- Makefile | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-) 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"