mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
chore: git hooks for linter and formatter
This commit is contained in:
@@ -1 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
pnpm pretty-quick --staged
|
||||
|
||||
# 运行 clippy fmt
|
||||
cargo fmt --manifest-path ./src-tauri/Cargo.toml
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "rustfmt failed to format the code. Please fix the issues and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git add .
|
||||
|
||||
# 允许提交
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user