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.
Peter Rabbitson committed
Mar 12, 2020 at 04:41 UTC
81cb535c52e07aaceb17461f8495c56b86bb5964
1 file changed
+1
-1
bin/test-go-fmt
+1
-1
@@ -1,7 +1,7 @@
1
#!/usr/bin/env bash
2
set -euo pipefail
3
T="$(mktemp)"
4
-find . -name '*.go' | xargs gofmt -l > "$T"
4
+find . -name '*.go' '!' -path ./plugin/loader/preload.go | xargs gofmt -l > "$T"
5
6
if [ -n "$(cat $T)" ]; then
7
echo "Following Go code is not formatted."