From b53558d9054cc968a45f7f289e1daa809a0e7153 Mon Sep 17 00:00:00 2001 From: jth-nw Date: Fri, 13 Mar 2026 15:18:57 -0500 Subject: [PATCH] fix: detect Vale warnings by checking output instead of exit code Vale only returns non-zero exit codes for error-level violations. Check the output for 'warning' or 'error' strings instead. Co-Authored-By: Claude Opus 4.6 --- .husky/pre-push | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index b2e504970f..03d78832e3 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -64,9 +64,8 @@ echo "$CHANGED_MD_FILES" > "$TMPFILE" while IFS= read -r FILE; do if [ -f "$FILE" ]; then - OUTPUT=$(vale --minAlertLevel=warning "$FILE" 2>&1) - EXIT_CODE=$? - if [ $EXIT_CODE -ne 0 ]; then + OUTPUT=$(vale "$FILE" 2>&1) + if echo "$OUTPUT" | grep -q "warning\|error"; then echo "$OUTPUT" echo "" VALE_FAILED=1