Skip to content

test(provider): make the syntaxError classification exhaustive (#591) - #593

Merged
e54-bot merged 1 commit into
mainfrom
fix/591-exhaustive-syntax-classification
Oct 19, 2026
Merged

e54-bot merged 1 commit into
mainfrom
fix/591-exhaustive-syntax-classification

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • cargo test -p opy-provider — 69/69 incl. the new exhaustive test
  • cargo fmt --all -- --check, cargo clippy -p opy-provider --all-targets -- -D warnings, git diff --check

The DOCUMENT_SYNTAX_CODES allowlist shipped incomplete twice (#587, #588): every omission silently returned valid:true for malformed documents. Adds EXCLUDED_CODES plus NON_DIAGNOSTIC_LITERALS and a unit test scanning all kebab-case literals in ../opy-rs/src — every diagnostic code must appear in exactly one list, so a new code fails until a reviewer classifies it. The deferred classes are documented on the list itself. Fixes #591

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exhaustive classification verified against merged main post-#592: all emitted kebab-case literals classify exactly once, no stale entries, test fails on unclassified additions. CI 6/6 green.

@e54-bot
e54-bot merged commit 5ba7c4e into main Oct 19, 2026
6 checks passed
@e54-bot
e54-bot deleted the fix/591-exhaustive-syntax-classification branch October 19, 2026 05:21
This was referenced Oct 19, 2026
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.

2 participants