feat(core): Add ReviewRuleMetadata for review rule catalog#113
Merged
Conversation
Mirror the lint side by exposing serializable metadata for every review rule. `ReviewRuleId::metadata()` and `ReviewRuleId::all_metadata()` become the single source of truth for `relune review --list-rules`, the WASM bindings, and the playground rule legend so each surface emits the same `rule_id` / `default_severity` / `description` shape. The `category` field is intentionally omitted because the lint categories do not map cleanly onto migration risk semantics.
Code Metrics Report
Details | | main (9882884) | #113 (ab83b8f) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 94.6% | 94.7% | +0.0% |
| Files | 81 | 81 | 0 |
| Lines | 36827 | 36858 | +31 |
+ | Covered | 34864 | 34912 | +48 |
| Test Execution Time | 1m33s | 1m33s | 0s |Code coverage of files in pull request scope (85.5% → 94.5%)
Reported by octocov |
Schema reviewTip ✅ No risk findings — schema changes look safe to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ReviewRuleMetadataandReviewRuleId::metadata()/ReviewRuleId::all_metadata()so the review rule catalog has a single serializable source of truth for the upcomingrelune review --list-rules, WASM bindings, and playground rule legend.ReviewRuleMetadatafromrelune-coreso downstream crates (relune-app,relune-cli,relune-wasm, playground) can depend on the same shape that lint already exposes viaLintRuleMetadata.categoryis intentionally not part of the metadata yet because the existing lint categories do not map cleanly onto migration risk semantics.Changes
ReviewRuleMetadata { rule_id, default_severity, description }next toRiskFindingand addmetadata()/all_metadata()helpers onReviewRuleIdReviewRuleMetadatafrom the crate root next toReviewRuleId, mirroring theLintRuleMetadataplacementrisk/<kebab>rule id form