Skip to content

Commit f2f1188

Browse files
committed
chore(c_formatting): check formatting on tests dir
We now check the src and tests dir for formatting, adding the Unity exception. Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent c75089b commit f2f1188

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/check_c_formatting.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2626
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
2727
SRC_DIR="$ROOT_DIR/src"
2828

29-
echo "Checking formatting in $SRC_DIR/.."
29+
echo "Checking C formatting."
3030

31-
find src -type f '(' -name '*.c' -o -name '*.h' ')' ! -name 'utlist.h' -print0 | \
31+
find . -type f '(' -name '*.c' -o -name '*.h' ')' \
32+
'(' -path './src/*' -o -path './tests/*' ')' \
33+
! -name 'utlist.h' \
34+
! -path './tests/Unity/*' \
35+
-print0 | \
3236
xargs -0 -n1 clang-format ${ARGUMENT} -Werror

0 commit comments

Comments
 (0)