Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static void afterAllAnalysis() throws IOException {
}

private static void prepareDumpOldFolder() throws Exception {
Path allRulesFolder = Paths.get("src/test/resources");
Path allRulesFolder = Paths.get("src/test/resources/expected/java");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Bug: CI ruling-root inputs still point at the old expectation root

ruling-update-and-notify copies the merged actual_* artifacts straight into ruling-root (cp -rv "$TEMP_DIR"/* "${ruling-root}/" in SonarSource/core-languages-tooling-public/ruling-update-and-notify/action.yml:302), and the artifacts are laid out as <project>/java-SXXXX.json. With ruling-root: 'its/ruling/src/test/resources' unchanged, the auto-update job will recreate the pre-PR its/ruling/src/test/resources/<project>/ tree instead of updating expected/java/<project>/, so the generated update PR never fixes the ruling failure that JavaRulingTest reads from src/test/resources/expected/java. Likewise ruling-diff-comment parses each changed path with parse_ruling_relative_path, which requires exactly <project>/<repo>-<rule>.json after stripping ruling-root; the new paths yield expected/java/<project>/java-SXXXX.json (4 parts), so every ruling file is dropped with "Skipping unrecognized ruling path" and no diff comment is ever posted again. Point both ruling-root inputs at its/ruling/src/test/resources/expected/java.

build.yml: point the auto-update action at the new expectation root (apply the same change to ruling-diff-comment.yml:56):

ruling-root: 'its/ruling/src/test/resources/expected/java'
  • Apply fix

Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎

if (SUBSET_OF_ENABLED_RULES.isEmpty()) {
effectiveDumpOldFolder = allRulesFolder.toAbsolutePath();
} else {
Expand Down
Loading
Loading