Repository navigation
RC-451 Migrate Java ruling expectations to SARIF - #6445
romainbrenguier wants to merge 12 commits into
Conversation
|
Stacked smoke-test draft: #6446 (base: romain/rc-451; do not merge its synthetic reports). Verified so far:
Full build/ruling pipelines are still running; baseline regeneration is intentionally delegated to the automatic ruling-update PR. |
|
CI follow-up fixes are now pushed as separate commits:
The empty-baseline HTML report generation was reproduced locally with the same diff2html-cli 5.2.15 used by CI and now passes. The initial Linux ruling jobs successfully generated and uploaded SARIF artifacts; their test failures are the expected missing-baseline differences. The stacked smoke-test Linux artifact upload/HTML steps also passed. Updated CI runs will validate the follow-up fixes and automatic PR generation. |
✅ All code review findings resolved.
|
End-to-end SARIF smoke-test validation succeeded on #6446:
Do not merge #6446 or its automatic update PR #6447 into the migration. The migration will receive its own automatic baseline PR. |
|
⚖️ Ruling update ready for review: #6448 |
1 similar comment
|
⚖️ Ruling update ready for review: #6448 |
|
⚖️ Ruling update ready for review: #6465 |
Ruling Diff SummaryDetected changes in 1266 rule files: 0 issues removed, 164156 issues added. S103 (
|
6e62bb7 to
0464ab5
Compare
|
⚖️ Ruling update ready for review: #6469 |
f238755 to
fcbca51
Compare
|
⚖️ Ruling update ready for review: #6471 |
|
⚖️ Ruling update ready for review: #6471 |
|
⚖️ Ruling update ready for review: #6476 |
|
⚖️ Ruling update ready for review: #6477 |
1596019 to
d518899
Compare
|
⚖️ Ruling update ready for review: #6483 |
|
⚖️ Ruling update ready for review: #6484 |
|
⚖️ Ruling update ready for review: #6486 |
BartLucien
left a comment
There was a problem hiding this comment.
Some docs needs to be updated.
- README
- new rule skill
Otherwise it looks good to me.
I do not approve to make sure that someone from the owner squad sees and accepts the changes
There was a problem hiding this comment.
Is this action still needed? I think it serves a similar purpose of what we are adding in this PR.
There was a problem hiding this comment.
👍 I created a ticket to check whether we can get rid of it https://sonarsource.atlassian.net/browse/RC-806
Co-authored-by: Romain Brenguier <11854194+romainbrenguier@users.noreply.github.com>
Code Review ✅ Approved 6 closed / 6 findings🟡 Medium risk · Migrating ruling baselines to SARIF and changing upload/diff workflows could omit or misrender findings in automated ruling comparisons. Migrates Java ruling expectations from JSON to SARIF, upgrades LITS to 0.13.0.16223, and updates the ruling diff workflow to trigger on SARIF changes. Resolved the empty expected directory breaking auto-update, stale JSON-based ruling docs, missing SARIF baselines for three projects, and an empty step 6 diff. The --new-file report of the expected/.gitkeep file as deleted is closed without a fix. No open issues remain. ✅ 6 closed✅ Bug: Deleting every baseline removes expected/ dir, breaking auto-update PR
✅ Quality: Ruling docs still describe JSON expectations after the SARIF switch
✅ Cross-PR: Pinning to pre-SARIF tooling would break the SARIF ruling flow
✅ Bug: SARIF baselines missing for 3 analyzed projects; ruling still fails
✅ Bug: Step 6 diffs actual vs expected after ruling is green, so it's empty
...and 1 more closed from earlier reviews Verification Rules 2/2 met PRs 3 inspectedFunctional validation No results Rules 2 passed 1 not applicable
Broader impact PRs 3 inspectedCross-PR 3 PRs inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|





Summary
The LITS upgrade, expectation deletion, and action updates are separate commits.
Validation
Summary by Gitar
its/ruling/src/test/resources/expected/.gitkeepto preserve the empty expected root for SARIF regenerationupload-actualnow creates the expected directory and uses--new-file, so diffs generate when baselines do not exist yetruling-diff-commentworkflow now triggers on SARIF changesJavaRulingTestnow loadssonar-lits-plugin0.13.0.16223 and selects.sarifexpectationsupload-actualraises Node heap to 8192 MB and capsdiff2htmlat 2000 changes to bound memorynew-ruleskill now collects TP/FP findings from SARIF diffs instead of JSON expectationsThis will update automatically on new commits.
Agent workflow
Tool link: https://github.com/SonarSource/languages-experimental-tooling/tree/romain/my-tickets/personal/romain-brenguier
PR updated using `uv run update_with_claude.py --prompt "Implement the action plan described in the document Update the version of the lits plugin used in this PR now that sonar-lits has been released, version: sonar-lits:0.13.0.16223." -a "Update the version of the lits plugin used in this PR now that sonar-lits has been released, version: sonar-lits:0.13....
PR updated using
uv run update_with_claude.py --prompt "Rebase on origin/master, fixing conflicts" -a "None" -g "codex"PR updated using
uv run update_with_claude.py --prompt "Implement the action plan described in the document /tmp/action_plan_romain/rc-451.txt." -a "/tmp/action_plan_romain/rc-451.txt" -g "codex"Iterated on the PR with
uv run ci_loop.pyfor 1 iterations.✔️ The PR is now ready for review.
PR updated using `uv run update_with_claude.py --prompt "Implement the action plan described in the document Some docs needs to be updated.