forked from KPGPMC/furlang
chore: improve the pre-commit hook
This commit is contained in:
@@ -13,10 +13,8 @@ if [ -z "$FILES" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for file in $FILES; do
|
||||
clang-format -i "$file"
|
||||
git add "$file"
|
||||
done
|
||||
git diff -U0 --cached | \
|
||||
python3 <(curl -s https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/clang/tools/clang-format/clang-format-diff.py) -p1 -i
|
||||
|
||||
echo "Running clang-tidy..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user