From 81cb535c52e07aaceb17461f8495c56b86bb5964 Mon Sep 17 00:00:00 2001 From: Peter Rabbitson Date: Thu, 12 Mar 2020 04:41:09 +0100 Subject: [PATCH] Prevent `go fmt` check from failing under `make -j10 test` Under high paralellism we would be regenerating the plugin source while doing the initial `go fmt` read. Instead simply exclude the generated file. --- bin/test-go-fmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/test-go-fmt b/bin/test-go-fmt index 8bc7d2e66..5b17f2d5c 100755 --- a/bin/test-go-fmt +++ b/bin/test-go-fmt @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail T="$(mktemp)" -find . -name '*.go' | xargs gofmt -l > "$T" +find . -name '*.go' '!' -path ./plugin/loader/preload.go | xargs gofmt -l > "$T" if [ -n "$(cat $T)" ]; then echo "Following Go code is not formatted."