1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00
SqMod/vendor/ZMQ/builds/cmake/clang-format-check.sh.in
2021-02-02 19:07:02 +02:00

15 lines
313 B
Bash

#!/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