From c04873bd6ab18f28bfc14c0b22a7f66ca649a1a1 Mon Sep 17 00:00:00 2001 From: jth-nw Date: Fri, 20 Mar 2026 11:22:01 -0500 Subject: [PATCH] debug: add Vale diagnostics to workflow and remove stderr suppression - Add diagnostic step to verify .vale.ini, styles dir, and rule count - Change 2>/dev/null to 2>&1 so Vale errors are visible - Add test file with known violations Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/vale-autofix.yml | 24 +++++++++++++++++++-- docs/accessanalyzer/12.0/vale-debug-test.md | 13 +++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 docs/accessanalyzer/12.0/vale-debug-test.md diff --git a/.github/workflows/vale-autofix.yml b/.github/workflows/vale-autofix.yml index e2dd93a0ff..93d7365109 100644 --- a/.github/workflows/vale-autofix.yml +++ b/.github/workflows/vale-autofix.yml @@ -59,6 +59,26 @@ jobs: chmod +x /tmp/vale /tmp/vale --version + - name: Verify Vale styles + if: steps.changed-files.outputs.count > 0 + run: | + echo "=== .vale.ini ===" + cat .vale.ini + echo "" + echo "=== Styles directory ===" + ls -la .vale/styles/Netwrix/ | head -20 + echo "" + echo "=== Rule count ===" + ls .vale/styles/Netwrix/*.yml | wc -l + echo "" + echo "=== Test Vale on first changed file ===" + FIRST_FILE=$(head -1 /tmp/changed-files.txt) + echo "Running: /tmp/vale --output JSON $FIRST_FILE" + /tmp/vale --output JSON "$FIRST_FILE" 2>&1 | head -100 || true + echo "" + echo "=== Vale stderr test ===" + /tmp/vale "$FIRST_FILE" 2>&1 || true + - name: Run Vale on changed files id: vale-initial if: steps.changed-files.outputs.count > 0 @@ -67,7 +87,7 @@ jobs: while IFS= read -r file; do if [ -f "$file" ]; then - RESULT=$(/tmp/vale --output JSON "$file" 2>/dev/null || true) + RESULT=$(/tmp/vale --output JSON "$file" 2>&1 || true) if [ -n "$RESULT" ] && [ "$RESULT" != "{}" ]; then echo "$RESULT" | jq --arg f "$file" ' [to_entries[] | .value[] | {path: $f, line: .Line, check: .Check, message: .Message}] @@ -114,7 +134,7 @@ jobs: while IFS= read -r file; do if [ -f "$file" ]; then - RESULT=$(/tmp/vale --output JSON "$file" 2>/dev/null || true) + RESULT=$(/tmp/vale --output JSON "$file" 2>&1 || true) if [ -n "$RESULT" ] && [ "$RESULT" != "{}" ]; then echo "$RESULT" | jq --arg f "$file" ' [to_entries[] | .value[] | {path: $f, line: .Line, check: .Check, message: .Message}] diff --git a/docs/accessanalyzer/12.0/vale-debug-test.md b/docs/accessanalyzer/12.0/vale-debug-test.md new file mode 100644 index 0000000000..ba3e15b61e --- /dev/null +++ b/docs/accessanalyzer/12.0/vale-debug-test.md @@ -0,0 +1,13 @@ +--- +title: "Vale Debug Test" +description: "Test page for debugging Vale in CI" +sidebar_position: 997 +--- + +# Vale Debug Test + +Make sure you select the correct check box in the drop-down menu. + +You do not need to click on the button. + +Please utilize the setup wizard in order to configure.