Write script for formatting code

This commit is contained in:
2024-10-25 13:32:28 +01:00
parent 308deb3886
commit 8f4fe21bcf
2 changed files with 26 additions and 0 deletions

5
scripts/format.sh Normal file
View File

@@ -0,0 +1,5 @@
cd "$(git rev-parse --show-toplevel)"
find . -not \( -path './.git' -prune \) \
-not \( -path './build' -prune \) \
-name '*.c' -o -name '*.h' \
| xargs -n 1 clang-format -i