Skip to content

Commit d3c176c

Browse files
committed
Update Makefile to improve formatting commands
- Modified format and format-check targets to use -print0 with xargs for better handling of filenames with spaces. - Ensured consistent formatting checks across C and header files.
1 parent 36a85c8 commit d3c176c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ lint:
1616
@echo "Lint passed!"
1717

1818
format:
19-
find . -name '*.c' -o -name '*.h' | xargs clang-format -i
19+
find . \( -name '*.c' -o -name '*.h' \) -print0 | xargs -0 clang-format -i
2020

2121
format-check:
22-
find . -name '*.c' -o -name '*.h' | xargs clang-format --dry-run --Werror
22+
find . \( -name '*.c' -o -name '*.h' \) -print0 | xargs -0 clang-format --dry-run --Werror
2323

2424
check: format-check lint
2525

0 commit comments

Comments
 (0)