PR showing 0% code coverage, yet jacoco.xml file exists

Must-share information (formatted with Markdown):

  • SonarQube developer 8.9
  • PR code coverage is showing 0%

Here’s the path of the Jacoco file: node/3/ws/impl/target/site/jacoco/jacoco.xml

Hey there.

You haven’t given us much information to go on. What build tool are you using? What do the scanner logs say?

In any case, I recommend starting at this guide:

Found the issue, needed to update the PR settings

PullRequestBuildOptions=test sonar:sonar -Dsonar.pullrequest.branch=${ghprbSourceBranch} -Dsonar.pullrequest.key=${ghprbPullId} -Dmaven.javadoc.failOnError=false

PullRequestBuildOptions=verify sonar:sonar -Dfull-reports -Dsonar.pullrequest.branch=${ghprbSourceBranch} -Dsonar.pullrequest.key=${ghprbPullId} -Dmaven.javadoc.failOnError=false