Dear Sonar team,
We are using Sonar to do Java static code check in our jenkins. As you know, there are two ways to implement it, one is using SonarScanner with configuration file sonar-project.properties, the other is way is using Maven(need to do some configuration with pom.xml).
Now we would like to integrate pmd and checkstyle. When using the latter way (Maven), we can refer link [External Analyzer Reports] Report generation for Java / Maven. After running mvn command, file checkstyle-result.xml and pmd.xml can be found under target folder.
However, currently we would like to prefer the former way (with sonar-project.properties) because it will decouple from java project, below is the configuration for pmd and checkstyle.
sonar.projectKey=my-sonar-test sonar.projectVersion=dev sonar.sources=src sonar.java.checkstyle.reportPaths=target/checkstyle-result.xml sonar.java.pmd.reportPaths=target/pmd.xml
But when running command sonar-scanner, there will be some errors, see below:
ERROR: Failed to import external issues report:C:\..\target\checkstyle-result.xml java.io.FileNotFoundException: C:\..\target\checkstyle-result.xml (The system cannot find the path specified)
So I guess it can not run pmd and checkstyle by sonar-project.properties, is that right?
Below is the system environment.
SonarQube version 7.6
SonarScanner version 4.0
Thanks a lot for your support!