diff --git a/.github/workflows/scripts/format_cpp.sh b/.github/workflows/scripts/format_cpp.sh index 4e7ebb5c4..6755e396a 100755 --- a/.github/workflows/scripts/format_cpp.sh +++ b/.github/workflows/scripts/format_cpp.sh @@ -1,12 +1,8 @@ #!/bin/bash -set -o pipefail +set -e -o pipefail find ./compiler/{include,lib,src} -iregex '^.*\.\(cpp\|cc\|h\|hpp\)$' | xargs clang-format -i -style='file' -if [ $? -ne 0 ] -then - exit 1 -fi # show changes if any git --no-pager diff