chore: update some other stuff

This commit is contained in:
2025-04-01 18:48:40 +02:00
parent e5b8b29a01
commit 0541f9d095
4 changed files with 107 additions and 0 deletions

14
scripts/format.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# Navigate to the repository root
cd "$(dirname "$0")/.." || exit 2
# Set the clang-format binary (defaults to 'clang-format')
CLANG_FORMAT_BIN="${CLANG_FORMAT_BIN:-clang-format}"
# Find and format all .hpp and .cpp files in the src directory
find ./src \( -iname '*.hpp' -o -iname '*.cpp' \) -print0 |
xargs -0 "$CLANG_FORMAT_BIN" -i || {
echo "Error: clang-format failed." >&2
exit 1
}