History squashed from internal development. Internal history has commit hash: e27a0e485c44a5003a802de2661ce3b21e120316
19 lines
363 B
Bash
19 lines
363 B
Bash
|
|
set -u
|
|
|
|
unformatted_files=""
|
|
for f in `find . -name *.h -o -name *.hh -o -name *.cc`; do
|
|
d=`clang-format -style=file $f | diff $f -`
|
|
if [ "$d" != "" ]; then
|
|
if [ "$unformatted_files" != "" ]; then
|
|
unformatted_files+=$'\n'
|
|
fi
|
|
unformatted_files+="$f"
|
|
fi
|
|
done
|
|
|
|
if [ "$unformatted_files" != "" ]; then
|
|
echo "$unformatted_files"
|
|
exit 1
|
|
fi
|