feat: add formatting command to package.json and update pre-commit hook for cargo fmt

This commit is contained in:
Tunglies
2025-05-20 22:58:05 +08:00
parent 400efa00ec
commit 420b0a254a
5 changed files with 10 additions and 7 deletions

View File

@@ -3,14 +3,16 @@
#pnpm pretty-quick --staged
# 运行 clippy fmt
cargo fmt --manifest-path ./src-tauri/Cargo.toml
cd src-tauri
cargo fmt
if [ $? -ne 0 ]; then
echo "rustfmt failed to format the code. Please fix the issues and try again."
exit 1
fi
cd ..
#git add .
git add .
# 允许提交
exit 0