From aa1b24762d495337583dfd0a88e4487e6742e8d6 Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Fri, 3 Jan 2020 16:16:58 -0800 Subject: [PATCH] lint: added retry loop around linter invocations --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6d0608c58..572f81ed6 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,8 @@ play: go run cmd/playground/main.go lint: $(LINTER_TOOL) - $(LINTER_TOOL) --deadline 180s run + # try running linter a couple of times since it is pretty flaky, especially on cold start + for retry in 1 2 3; do echo "Running linter, attempt #$$retry"; $(LINTER_TOOL) --deadline 180s run && s=0 && break || s=$$? && sleep 1; done; (exit $$s) lint-and-log: $(LINTER_TOOL) $(LINTER_TOOL) --deadline 180s run | tee .linterr.txt