If you’re speaking about code coverage, it looks like the file you’ve specified in this PR doesn’t exist when the SonarCloud scan runs.
13:09:50.044 INFO: Sensor JaCoCo XML Report Importer [jacoco]
13:09:50.050 WARN: No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths='prime-router/build/test-results/test'. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
13:09:50.051 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
13:09:50.051 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=7ms
You’ll need to make sure any test results are available where the SonarCloud scan is taking place (and point to a file rather than a directory).
That may be enough, but typically we’d suggest using the SonarScanner for Gradle for analyzing Java/Kotlin code that is built using Gradle. This ensures the most accurate analysis results and very low-configuration for things like importing code coverage reports (which we have helpful guides for)
Thank you for your help, I am having trouble figuring out which docs are for sonarcloud versus sonarcube. Here is the output.
prime-router % ./gradlew build jacocoTestReport sonarqube
Configure project :
default messager has already been registered
Task :sonarqube FAILED
SonarQube server [http://localhost:9000] can not be reached
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':sonarqube'.
Unable to execute SonarScanner analysis
I assume there needs to be something like a sonar.properties ?