Skip to content

Code IfVersion attribute diagnostics - #1319

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

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

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Maps <IfVersion> attribute failures to stable diagnostics: SNIP020 for unknown attributes, SNIP021 for an invalid repository URL, SNIP022 for an unregistered repository, and SNIP023 for an invalid PR expression.

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

Why

Condition-attribute diagnostics are separate from conditional structure and candidate-identity diagnostics.

Validation

  • python -m pytest tests/test_if_version_attribute_diagnostics.py tests/test_if_version_attribute_validation.py (11 passed)
  • python -m ruff check scripts/snippets/diagnostics.py tests/test_if_version_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