From f3ad6cee41cc7e98cccff74540fcf1aa2a1cb215 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:43:59 +0800 Subject: [PATCH] feat: add code format check in pre-push hook --- .husky/pre-push | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.husky/pre-push b/.husky/pre-push index afeed10c..e6e72ff1 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -8,4 +8,12 @@ if git diff --cached --name-only | grep -q '^src-tauri/'; then fi fi +if [[ "$(git rev-parse --show-toplevel)" == */clash-verge-rev/clash-verge-rev ]]; then + pnpm format:check + if [ $? -ne 0 ]; then + echo "Code format check failed. Please fix formatting before pushing." + exit 1 + fi +fi + exit 0