Commit 6b514767 authored by Rohit Jnagal's avatar Rohit Jnagal

Merge pull request #6460 from jayunit100/gofmtmsg

Make gofmt message precise (-s option)
parents 6d6f0d90 8d6c1636
...@@ -44,9 +44,10 @@ find_files() { ...@@ -44,9 +44,10 @@ find_files() {
\) -name '*.go' \) -name '*.go'
} }
bad_files=$(find_files | xargs gofmt -s -l) GOFMT="gofmt -s"
bad_files=$(find_files | xargs $GOFMT -l)
if [[ -n "${bad_files}" ]]; then if [[ -n "${bad_files}" ]]; then
echo "!!! gofmt needs to be run on the following files: " echo "!!! '$GOFMT' needs to be run on the following files: "
echo "${bad_files}" echo "${bad_files}"
exit 1 exit 1
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment