Skip to content
Closed
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
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .github/actions/upload-actual/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ runs:
EXPECTED_DIR: ${{ inputs.expected-dir }}
ACTUAL_DIR: ${{ inputs.actual-dir }}
NAME: ${{ inputs.name }}
NODE_OPTIONS: --max-old-space-size=8192
run: |
cd "${IT_DIR}"
mkdir -p target
diff --unified --recursive --strip-trailing-cr "${EXPECTED_DIR}" "${ACTUAL_DIR}" > "target/test.diff" || true
npx diff2html-cli --input file --style side --file "target/diff_${NAME}.html" -- "target/test.diff"
mkdir -p target "${EXPECTED_DIR}"
diff --unified --recursive --new-file --strip-trailing-cr "${EXPECTED_DIR}" "${ACTUAL_DIR}" > "target/test.diff" || true
npx diff2html-cli --input file --style side --diffMaxChanges 2000 --file "target/diff_${NAME}.html" -- "target/test.diff"

- name: Upload Diff Report
if: runner.os != 'Windows'
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ruling-diff-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
pull_request:
types: [opened, synchronize, reopened]
paths:
# Trigger on ruling JSON file changes
- 'its/ruling/src/test/resources/**/*.json'
- 'its/ruling/src/test/resources/expected/**/*.sarif'
# Uncomment to test action changes
- '.github/workflows/ruling-diff-comment.yml'
workflow_dispatch:
Expand Down Expand Up @@ -45,15 +44,13 @@ jobs:
with:
enable-cache: true

# Use the action from the branch we just pushed
- name: Post ruling diff comment
uses: SonarSource/core-languages-tooling-public/ruling-diff-comment@master
with:
pr-number: ${{ inputs.pr-number || github.event.pull_request.number }}
repository: ${{ github.repository }}
base-sha: ${{ inputs.base-sha || github.event.pull_request.base.sha }}
head-sha: ${{ inputs.head-sha || github.event.pull_request.head.sha }}
ruling-root: 'its/ruling/src/test/resources/expected'
sources-root: 'its/sources'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static OrchestratorRule createOrchestrator() {
.useDefaultAdminCredentialsForBuilds(true)
.setSonarVersion(System.getProperty("sonar.runtimeVersion", "LATEST_RELEASE"))
.addPlugin(FileLocation.of(TestClasspathUtils.findModuleJarPath("../../sonar-java-plugin").toFile()))
.addPlugin(MavenLocation.of("org.sonarsource.sonar-lits-plugin", "sonar-lits-plugin", "0.11.0.2659"));
.addPlugin(MavenLocation.of("org.sonarsource.sonar-lits-plugin", "sonar-lits-plugin", "0.13.0.16223"));

if (isCommunityEditionTestsOnly()) {
orchestratorBuilder.setEdition(Edition.COMMUNITY);
Expand Down Expand Up @@ -182,9 +182,9 @@ private static void copyDumpSubset(Path srcProjectDir, Path dstProjectDir) {
throw new IllegalStateException("Unable to create directory: " + dstProjectDir.toString());
}
SUBSET_OF_ENABLED_RULES.stream()
.map(ruleKey -> srcProjectDir.resolve("java-" + ruleKey + ".json"))
.map(ruleKey -> srcProjectDir.resolve("java-" + ruleKey + ".sarif"))
.filter(p -> p.toFile().exists())
.forEach(srcJsonFile -> copyFile(srcJsonFile, dstProjectDir));
.forEach(srcSarifFile -> copyFile(srcSarifFile, dstProjectDir));
}

private static void copyFile(Path source, Path targetDir) {
Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions its/ruling/src/test/resources/eclipse-jetty/java-S3949.json

This file was deleted.

1 change: 1 addition & 0 deletions its/ruling/src/test/resources/expected/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

This file was deleted.

Loading
Loading