0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00
libzmq/builds/cmake/clang-format-check.sh.in

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
313 B
Bash
Raw Normal View History

#!/bin/sh
FAILED=0
IFS=";"
FILES="@ALL_SOURCE_FILES@"
IDS=$(echo -en "\n\b")
for FILE in $FILES
do
@CLANG_FORMAT@ -style=file -output-replacements-xml "$FILE" | grep "<replacement " >/dev/null &&
{
echo "$FILE is not correctly formatted"
FAILED=1
}
done
if [ "$FAILED" -eq "1" ] ; then exit 1 ; fi