Permalink
Browse files

shift clang-format to advise (#1744)

  • Loading branch information...
JohnLangford committed Feb 5, 2019
1 parent d0c9042 commit 5a80139903d4a212feacda56aa8239a77f1edd10
Showing with 3 additions and 4 deletions.
  1. +3 −4 utl/clang-format
@@ -6,17 +6,16 @@
# Intended to be used with clang-format 7.0.1.

for VW_FILE in $(find vowpalwabbit -type f -name '*.cc' -o -name '*.h'); do

if [ "$1" = check ]; then
diff $VW_FILE <(clang-format $VW_FILE);
if [ $? -ne 0 ]; then
echo "Run \"./utl/clang-format fix\""
exit 1
fi
fi

if [ "$1" = fix ]; then
clang-format -i $VW_FILE;
fi

done

0 comments on commit 5a80139

Please sign in to comment.