Hello Sonar Team!
I am configuring a GitHub action whose purpose is to scan changed files using the Apex pmd scanner and import the resulting findings into SonarQube. The Apex PMD scanner results are saved to the file pmd-report.xml.
sf scanner run \
--target "$CHANGED_FILES" \
--engine pmd \
--format xml \
--outfile pmd-report.xml
In the GitHub Actions logs, I can see that vulnerabilities are present
Executed pmd, found 56 violation(s) across 1 file(s).
As the next step, I run the SonarCloud action, passing the sonar.apex.pmd.reportPaths parameter.
Could you add -Dsonar.verbose=true to your analysis command and provide the resulting log here, redacted as necessary?
Some of the sensors are less than fulsome in their reporting when e.g. a file is not found. I’d like to see what, if anything, shows up for this at DEBUG level.
Thanks for the log. I see the report being imported:
Since the duration is non-zero, I assume it’s doing something.
Unfortunately the logs don’t tell us what.
Let’s take a look at paths. A common cause of missing data is path mis-match. What do the file paths in the report look like, and how do they compare to the file paths analysis is seeing (i.e. the paths you see inside SonarQube Cloud)?