Skip to content

Z503: SNIPPET_ERROR

Severity: warning Penalty: 10.0 points Category: content Auto-fixable: No

Rationale

This content quality rule is emitted when a fenced code block with a specified language tag (such as python or yaml) contains syntax errors that fail AST parsing for that language.

How to Fix

Inspect the flagged location in the Markdown file and update the content or configuration:

Bad (Triggers Z503)

<!-- BAD: Invalid Python syntax in fenced code block -->
```text
def calculate_score(
```

Good (Resolves Z503)

<!-- GOOD: Valid Python syntax or use 'text' tag for partial code -->
```python
def calculate_score(penalty: float) -> float:
    return 100.0 - penalty
```

Configuration

# Evaluated for fenced code blocks with language specifiers

Reference

See the Finding Codes Index for finding code details.