lint: added retry loop around linter invocations

This commit is contained in:
Jarek Kowalski committed 2020-01-03 16:39:30 -08:00
1 parent 1bb7eeebe7
commit aa1b24762d
1 file changed
+2 -1
+2 -1
View File
@@ -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