mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
chore: more friendly lint
This commit is contained in:
@@ -33,7 +33,7 @@ if [ -n "$RUST_FILES" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Run clippy for linting
|
# Run clippy for linting
|
||||||
if ! cargo clippy -- -D warnings; then
|
if ! cargo clippy; then
|
||||||
echo "clippy found issues. Please fix them before committing."
|
echo "clippy found issues. Please fix them before committing."
|
||||||
cd ..
|
cd ..
|
||||||
exit 1
|
exit 1
|
||||||
@@ -42,4 +42,4 @@ if [ -n "$RUST_FILES" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Allow commit
|
# Allow commit
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# $2: remote url (e.g., git@github.com:clash-verge-rev/clash-verge-rev.git)
|
# $2: remote url (e.g., git@github.com:clash-verge-rev/clash-verge-rev.git)
|
||||||
|
|
||||||
if git diff --cached --name-only | grep -q '^src-tauri/'; then
|
if git diff --cached --name-only | grep -q '^src-tauri/'; then
|
||||||
cargo clippy --manifest-path ./src-tauri/Cargo.toml -- -D warnings
|
cargo clippy --manifest-path ./src-tauri/Cargo.toml
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Clippy found issues in src-tauri. Please fix them before pushing."
|
echo "Clippy found issues in src-tauri. Please fix them before pushing."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -31,4 +31,4 @@ else
|
|||||||
echo "[pre-push] Remote $remote_name does not exist. Skipping format check."
|
echo "[pre-push] Remote $remote_name does not exist. Skipping format check."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user