Skip to content

Code IfVersion structure diagnostics - #1320

Draft
danielporterda wants to merge 1 commit into
snippet-if-version-attribute-diagnosticsfrom
snippet-if-version-structure-diagnostics
Draft

Code IfVersion structure diagnostics#1320
danielporterda wants to merge 1 commit into
snippet-if-version-attribute-diagnosticsfrom
snippet-if-version-structure-diagnostics

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Maps conditional structure failures to stable diagnostics: unexpected closing tag SNIP012, misplaced <Else> SNIP025, unclosed tag SNIP026, duplicate fallback SNIP029, and fallback-not-final SNIP030.

This PR assigns codes only and does not change structure validation.

Why

Conditional structure diagnostics are separate from <IfVersion> attribute and candidate-identity diagnostics.

Validation

  • python -m pytest tests/test_if_version_structure_diagnostics.py tests/test_if_version_structure_validation.py (13 passed)
  • python -m ruff check scripts/snippets/diagnostics.py tests/test_if_version_structure_diagnostics.py
  • python -m mypy scripts/snippets/diagnostics.py
  • git diff --check

Signed-off-by: danielporterda <daniel.porter@digitalasset.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant