Update clang-format-check.sh and make executable (#156)

* Update clang-format-check.sh and make executable

* Make executable

Co-authored-by: Isaac <iico7no2@gmail.com>
This commit is contained in:
icogn 2021-10-14 17:01:58 -05:00 committed by GitHub
parent a2636e84c3
commit b88cb8cdc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

5
tools/clang-format-check.sh Normal file → Executable file
View File

@ -4,11 +4,8 @@ clangFormatTargets=$(find . -type f -regex '.*\.\(cpp\|hpp\|h\|cc\|cxx\)')
for inputFile in $clangFormatTargets
do
clang-format-10 -style=file $inputFile > $inputFile-formatted
diff $inputFile $inputFile-formatted
clang-format-10 --dry-run --Werror -style=file $inputFile
if [ $? != 0 ] ; then
exit 1
else
rm $inputFile-formatted
fi
done