RC-350 Unify ruling expectation file locations. - #827
romainbrenguier wants to merge 1 commit into
Conversation
Move ruling expectation files from expected/ to expected/web/project/ to follow the consistent expected/<language>/<project-key>/<rule-id>.json convention used across analyzers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| .setProperty("sonar.html.file.suffixes", "xhtml,html,php,erb") | ||
| .setProperty("sonar.jsp.file.suffixes", "jspf,jsp") | ||
| .setProperty("sonar.lits.dump.old", FileLocation.of("src/test/resources/expected").getFile().getAbsolutePath()) | ||
| .setProperty("sonar.lits.dump.old", FileLocation.of("src/test/resources/expected/web/project").getFile().getAbsolutePath()) |
There was a problem hiding this comment.
⚠️ Bug: CI ruling auto-update still copies into old flat expected/ dir
The ruling auto-update step copies its/ruling/target/actual/* (a flat set of Web-*.json files produced by sonar.lits.dump.new) into its/ruling/src/test/resources/expected/, which was the correct target only while the expectations lived flat in that directory. After this PR the test reads expectations from expected/web/project, so on a ruling failure the workflow will commit 76 stale duplicate JSON files at the old root path and never update the files the test actually compares against — the auto-update becomes a no-op that pollutes the PR and the ruling test keeps failing. Point the copy at the new directory (the git add its/ruling/src/test/resources/expected/ line still covers the subdirectory).
Copy the LITS dump into the new expected/web/project directory:
cp -r its/ruling/target/actual/* its/ruling/src/test/resources/expected/web/project/
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
CI failed: The CI build failed because the generated ruling report comment exceeded the GitHub GraphQL API comment length limit of 65,536 characters.Overview1 log analyzed showing a failure during the GitHub comment creation step due to payload size limits being exceeded. FailuresGitHub Comment Body Too Long (confidence: high)
Summary
Code Review
|
| Auto-apply | Compact | Unblock |
|
|
|
Was this helpful? React with 👍 / 👎 | Gitar
|






Summary
its/ruling/src/test/resources/expected/toits/ruling/src/test/resources/expected/web/project/WebRulingTest.javato reference the new pathTest plan
🤖 Generated with Claude Code