Skip to content

Validate basic Snippet attributes - #1311

Draft
danielporterda wants to merge 1 commit into
snippet-gate-local-source-refsfrom
snippet-validate-basic-attributes
Draft

Validate basic Snippet attributes#1311
danielporterda wants to merge 1 commit into
snippet-gate-local-source-refsfrom
snippet-validate-basic-attributes

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Composes the independently introduced attribute-name, language-token, and marker-pair rules for one <Snippet> tag.

It does not resolve the source, apply repository/local policy, validate compatibility-only extraction fields, or inspect enclosing conditions.

Why

This is the smallest useful semantic check for the core authoring attributes while keeping source and release behavior separate.

Validation

  • python -m pytest tests/test_snippet_basic_attribute_validation.py tests/test_snippet_attribute_name_validation.py tests/test_snippet_language_validation.py tests/test_snippet_marker_pair_validation.py (28 passed)
  • python -m ruff check scripts/snippets/model.py scripts/snippets/semantics.py tests/test_snippet_basic_attribute_validation.py
  • python -m mypy scripts/snippets/model.py scripts/snippets/semantics.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