diff --git a/tools/clang-format-check.sh b/tools/clang-format-check.sh old mode 100644 new mode 100755 index 52f09a1332c..e6279d268d3 --- a/tools/clang-format-check.sh +++ b/tools/clang-format-check.sh @@ -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