RC-350 Unify ruling expectation file locations - #1803
Conversation
Move ruling expectation files from its/ruling/src/integrationTest/resources/expected/<project>/ to its/ruling/src/test/resources/expected/php/<project>/ so that the file layout is consistent across all analyzers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| .setProperty("sonar.lits.dump.old", FileLocation.of("src/test/resources/" + expectedIssueLocation).getFile().getAbsolutePath()) | ||
| .setProperty("sonar.lits.dump.new", FileLocation.of("build/actual").getFile().getAbsolutePath()) |
There was a problem hiding this comment.
💡 Quality: README ruling procedure points at the pre-move expected path
The README's "Ruling Test" instructions tell developers to copy actual issues into sonar-php/its/ruling/src/test/resources/expected/, but after this PR the expectation files live one level deeper, under expected/php/<project>/. A developer following the documented procedure would create a second expected/<project>/ tree that no test reads, and the ruling test would keep failing. While updating this block, the source directory is also stale: RulingHelper sets sonar.lits.dump.new to build/actual (Gradle), not target/actual (Maven).
Update the README ruling instructions to the Gradle output dir and the new expected layout:
If everything looks good to you, you can copy the file with the actual issues located at
```
sonar-php/its/ruling/build/actual/
```
into the directory with the expected issues
```
sonar-php/its/ruling/src/test/resources/expected/php/<project>/
```
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
CI failed: 1 infrastructure failure due to a temporary HTTP 503 Service Unavailable error when fetching scanner-engine metadata during the SonarQube analysis task.OverviewOne log was analyzed, revealing a transient external service failure during the SonarQube analysis step. FailuresSonarQube Scanner Engine Metadata HTTP 503 Failure (confidence: high)
Summary
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsRefactors ruling expectation file locations to normalize paths across analyzers, moving files from 💡 Quality: README ruling procedure points at the pre-move expected path📄 its/ruling/src/integrationTest/java/org/sonar/php/it/RulingHelper.java:64-65 The README's "Ruling Test" instructions tell developers to copy actual issues into Update the README ruling instructions to the Gradle output dir and the new expected layout🤖 Prompt for agentsTip 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
its/ruling/src/integrationTest/resources/expected/<project>/toits/ruling/src/test/resources/expected/php/<project>/<rule-id>.jsonRulingHelper,PhpGeneralRulingTest, andPhpPrAnalysisTestto reference the new pathsTest plan
🤖 Generated with Claude Code