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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in $FILES; do
|
git diff -U0 --cached | \
|
||||||
clang-format -i "$file"
|
python3 <(curl -s https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/clang/tools/clang-format/clang-format-diff.py) -p1 -i
|
||||||
git add "$file"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Running clang-tidy..."
|
echo "Running clang-tidy..."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user