Files
snmalloc/check-format.sh
Matthew Parkinson 4f9d991449 Initial commit of snmalloc
History squashed from internal development.

Internal history has commit hash:
  e27a0e485c44a5003a802de2661ce3b21e120316
2019-01-15 14:17:55 +00:00

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