diff options
Diffstat (limited to '.ci/format.sh')
-rwxr-xr-x | .ci/format.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.ci/format.sh b/.ci/format.sh index d87bfb66..d3b629c3 100755 --- a/.ci/format.sh +++ b/.ci/format.sh @@ -1,14 +1,15 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # Runs the Clang Formatter # Return codes: # - 1 there are files to be formatted # - 0 everything looks fine -set -o errexit -set -o pipefail -set -o nounset +set -eu -FILES=`find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \)` +FILES=$(find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \)) -clang-format -i $FILES && git diff --exit-code +for f in $FILES +do + clang-format -i "$f" && git diff --exit-code +done; |