We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a9574d commit 19646e4Copy full SHA for 19646e4
scripts/test.sh
@@ -1,13 +1,13 @@
1
#!/usr/bin/env bash
2
3
-FMT="*.go"
4
-
5
echo "Running tests..."
6
go test -v -cover -cpu 1,2,4 ./...
7
go test -v -cover -cpu 1,2,4 -race ./...
8
9
echo "Checking gofmt..."
10
-fmt_res=$(gofmt -l -s $FMT)
+# We utilize 'go fmt' to find all files suitable for formatting,
+# but reuse full power gofmt to perform just RO check.
+fmt_res=$(go fmt -n ./... | sed 's| -w | -d |g' | sh)
11
if [ -n "${fmt_res}" ]; then
12
echo -e "gofmt checking failed:\n${fmt_res}"
13
exit 1
0 commit comments