aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/dockerfile
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2016-01-13 10:42:19 -0800
committerGravatar yang-g <yangg@google.com>2016-01-13 10:42:19 -0800
commitdc548ed65db8704906864586d5bc1ba08933ee78 (patch)
tree7bad31e37068a8d6c8cd160b53d88f9cd9d7675c /tools/dockerfile
parent15f383c6cc74e94cdc7223552824135acab00e7f (diff)
parent7149ca6bd0ce73a08fa512415d3f641a06a15a75 (diff)
merge with head
Diffstat (limited to 'tools/dockerfile')
-rwxr-xr-xtools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh14
1 files changed, 12 insertions, 2 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 60fd30cd6f..ededc6e809 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
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,6 +28,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+set -e
+
# directories to run against
DIRS="src/core src/cpp test/core test/cpp include"
@@ -50,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