Skip to content

Code snippet source attribute diagnostics - #1316

Draft
danielporterda wants to merge 1 commit into
snippet-local-ref-remediationfrom
snippet-source-attribute-diagnostics
Draft

Code snippet source attribute diagnostics#1316
danielporterda wants to merge 1 commit into
snippet-local-ref-remediationfrom
snippet-source-attribute-diagnostics

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Maps source/path attribute validation rules to stable diagnostics SNIP002SNIP006 and SNIP008, preserving the tag's page span and message.

This PR covers only source/path attribute shape. Repository/path safety, basic attributes, conditions, and syntax errors remain separate diagnostic layers.

Why

Stable error-code assignment is independently reviewable from both validation behavior and output formatting.

Validation

  • python -m pytest tests/test_snippet_source_attribute_diagnostics.py tests/test_snippet_source_attribute_resolution.py (16 passed)
  • python -m ruff check scripts/snippets/diagnostics.py tests/test_snippet_source_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