aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/dockerfile/grpc_clang_format
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-01-08 12:33:22 -0800
committerGravatar murgatroid99 <mlumish@google.com>2016-01-08 12:33:22 -0800
commit8b791a4a7f784fb367af6e56c2596c578e974338 (patch)
treeab7baa05c08aeac191768fadc766866434beb36b /tools/dockerfile/grpc_clang_format
parentc357749b48720e00bce57c26acb2195047d63263 (diff)
parentb47eab53dec9a6d811ad26e0873dc7ec1bac7d46 (diff)
Merged from master and resolved merge conflicts
Diffstat (limited to 'tools/dockerfile/grpc_clang_format')
-rwxr-xr-xtools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh15
1 files changed, 12 insertions, 3 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..87445c71ce 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,16 @@ 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
-