Skip to content

Code basic Snippet attribute diagnostics - #1318

Draft
danielporterda wants to merge 1 commit into
snippet-source-safety-diagnosticsfrom
snippet-basic-attribute-diagnostics
Draft

Code basic Snippet attribute diagnostics#1318
danielporterda wants to merge 1 commit into
snippet-source-safety-diagnosticsfrom
snippet-basic-attribute-diagnostics

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Maps basic <Snippet> attribute failures to stable diagnostics: SNIP015 for unknown attributes, SNIP016 for an unsafe/missing language, and SNIP017 for an invalid marker pair.

This PR assigns codes only; it does not change the underlying validation rules.

Why

Basic attribute diagnostics are independent from source, condition, structure, and syntax diagnostics.

Validation

  • python -m pytest tests/test_snippet_basic_attribute_diagnostics.py tests/test_snippet_basic_attribute_validation.py (7 passed)
  • python -m ruff check scripts/snippets/diagnostics.py tests/test_snippet_basic_attribute_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