Skip to content

Commit

Permalink
Exclude more concurrency-sensitive dirs from fmt test
Browse files Browse the repository at this point in the history
  • Loading branch information
ribasushi committed Mar 15, 2020
1 parent 6774106 commit 5d3247f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/test-go-fmt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
T="$(mktemp)"
find . -name '*.go' '!' -path ./plugin/loader/preload.go | xargs gofmt -l > "$T"
find . \
-path ./test/sharness -prune \
-o -path ./plugin/loader/preload.go -prune \
-o -name '*.go' -print0 | xargs -0 gofmt -l > "$T"

if [ -n "$(cat $T)" ]; then
echo "Following Go code is not formatted."
Expand Down

0 comments on commit 5d3247f

Please sign in to comment.