Skip to content

feat(review): carry rule_id on ReviewIssue; cora-ignore and ignore.rules match ids (#597) - #602

Merged
ajianaz merged 1 commit into
developfrom
feat/rule-id-597
Oct 8, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/rule-id-597

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

What

  • ReviewIssue gains rule_id: Option<String> (serde(default, skip_serializing_if = none)) and a non-serialized also_matches: Vec<String>.
  • merge_rule_findings populates rule_id from the scanner finding; index-scanner findings get index-unused-import / index-dead-code.
  • cora-ignore: <x> suppresses when <x> equals the title, the rule id, or an alias (exact, case-insensitive). ignore.rules keeps substring-on-title/type and additionally matches ids exactly.
  • Dedup edge case: when a scanner finding is dropped because an LLM issue is on the same line, its id and title are pushed onto the surviving issue's also_matches, so a marker naming the scanner rule still suppresses it.
  • Rule id is shown as (rule: id) in pretty output, (id) in compact, rule_id in JSON, properties.coraRuleId in SARIF. Docs and CHANGELOG updated.

Why

Scanner findings lost their id in merge, so cora-ignore: could only match titles, and a marker naming the scanner rule did nothing when an LLM issue displaced the finding. Follow-up to #554.

Testing

  • New tests: id match, title match, case-insensitivity/exactness, id via ignore.rules, merge-dedup edge case (end to end through merge_rule_findings + apply), old JSON without rule_id deserializes, rule_id serialized only when present and aliases never.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test all green.

Closes #597

🤖 Generated with Claude Code

@ajianaz
ajianaz merged commit 896befc into develop Oct 8, 2026
14 checks passed
@ajianaz
ajianaz deleted the feat/rule-id-597 branch October 16, 2026 00:43
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.

feat(review): carry rule_id on ReviewIssue so cora-ignore can match ids and survive merge dedup

1 participant