Commit de202382 authored by Peter W. Draper's avatar Peter W. Draper

Use git to enumerate the .c and .h files that are under control, otherwise we...

Use git to enumerate the .c and .h files that are under control, otherwise we fail when temporary .h files are also formatted (version_string.h)
parent 50457d68
......@@ -5,7 +5,7 @@
clang=${CLANG_FORMAT_CMD:="clang-format-5.0"}
# Formatting command
cmd="$clang -style=file src/*.[ch] src/*/*.[ch] src/*/*/*.[ch] examples/main.c tests/*.[ch]"
cmd="$clang -style=file $(git ls-files | grep '\.[ch]$')"
# Test if `clang-format-5.0` works
command -v $clang > /dev/null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment