ci: make clang-format-check fail if clang-format does not exist

pull/152/head
matejcik 5 years ago
parent bc77cad5e4
commit f8a1f47e67

@ -2,6 +2,10 @@
error=0
for f in $*; do
changes=$(clang-format -output-replacements-xml "$f" | grep -c '^<replacement ')
if [ "$?" -ne "0" ]; then
echo "clang-format failed"
exit 1
fi
if test "$changes" -gt 0; then
echo "$f ... $changes changes needed"
error=1

Loading…
Cancel
Save