fix clang-format check

This commit is contained in:
Pheenoh
2021-01-31 20:49:35 -05:00
parent 24d529f67b
commit ff68771d32
3 changed files with 20 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
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
if [ $? != 0 ] ; then
exit 1
else
rm $inputFile-formatted
fi
done