From 999d90d58892b6682ace204f1cad79076d773224 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 5 Dec 2022 19:02:23 +0100 Subject: [PATCH] Update check-formatting.sh --- tools/check-formatting.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/check-formatting.sh b/tools/check-formatting.sh index 029a3a05..5e5699d5 100755 --- a/tools/check-formatting.sh +++ b/tools/check-formatting.sh @@ -12,8 +12,9 @@ ALL_OK=1 for f in ${SOURCES[@]} do - clang-format -n $f 2>&1 | grep ".*" >/dev/null - if [ "$?" = "0" ] + clang-format -n $f 2>&1 | grep -q ^ + RESULT=$? + if [ "$RESULT" = "0" ] then echo "File $f needs formatting" ALL_OK=0