aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/dockerfile/grpc_clang_format
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-01-04 15:29:07 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-01-04 15:29:07 -0800
commit482234f456cb0cc71fa8ca39af758d4b976b7b47 (patch)
treecdf34aca0fa61e90253e55bf8c63c93dabb810aa /tools/dockerfile/grpc_clang_format
parent64195a7dedca90b07d5de5531aacc5472087c448 (diff)
Get better output for clang-format diffs
Diffstat (limited to 'tools/dockerfile/grpc_clang_format')
-rwxr-xr-xtools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh
index c57ed689b4..9914dbdb49 100755
--- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh
+++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh
@@ -52,9 +52,17 @@ if [ "x$TEST" = "x" ]
then
echo $files | xargs $CLANG_FORMAT -i
else
+ ok=yes
for file in $files
do
- $CLANG_FORMAT $file | diff $file -
+ tmp=`mktemp`
+ $CLANG_FORMAT $file > $tmp
+ diff -u $file $tmp || ok=no
+ rm $tmp
done
+ if [ $ok == no ]
+ then
+ false
+ fi
fi