Skip to content

Commit 9b95615

Browse files
committed
Show full MDX lint error in PR annotation
1 parent 4a03e78 commit 9b95615

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/verify.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ jobs:
124124
if: steps.check-docs.outputs.has_docs == 'true'
125125
run: |
126126
echo "Validating docs/connector.mdx..."
127-
if node _workflows/tools/mdx-lint/mdx-lint.mjs < _caller/docs/connector.mdx; then
127+
LINT_OUTPUT=$(node _workflows/tools/mdx-lint/mdx-lint.mjs < _caller/docs/connector.mdx 2>&1)
128+
if [ $? -eq 0 ]; then
128129
echo "MDX validation passed"
129130
else
130-
echo "::error file=docs/connector.mdx::MDX validation failed. Check for malformed tags, unclosed components, or unsupported syntax."
131+
echo "$LINT_OUTPUT"
132+
echo "::error file=docs/connector.mdx::${LINT_OUTPUT}"
131133
exit 1
132134
fi
133135

0 commit comments

Comments
 (0)