Run clang-format with make check

This commit is contained in:
Petri Lehtinen
2019-10-19 20:46:34 +03:00
parent a8f5fa5f5a
commit f912430cda
5 changed files with 11 additions and 5 deletions

View File

@@ -5,6 +5,12 @@ if [ -n "$1" ]; then
clangformat="clang-format-$1"
fi
if ! type $clangformat >/dev/null; then
# clang-format not found. If running tests, mark this test as
# skipped.
exit 77
fi
errors=0
paths=$(find . -type f -a '(' -name '*.c' -o -name '*.h' ')')
for path in $paths; do