Seeing '--' codecoverage in sonar report for PR

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • Developer Edition
  • Version 9.9.1
  • what are you trying to achieve
    The code changes in a PR should be reflected in the sonarreport also the respective the coverage. I dont see any coverage details. But there are so much of code has been changed.
  • what have you tried so far to achieve this

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

I would need to know what can achieve the coverage for new code while doing the PR.
Should I add any plugins ?
I read about scm integration as well.

Hi,

To have coverage reflected in your analyses, you need to pass a coverage report into analysis.

But given the screenshot you’ve shared, I’m not sure that would help. It doesn’t look like any lines of code were changed in this particular PR…?

 
Ann

Hi Ann, Thanks for the reply.
There were many lines of code get changed for the PR. But neither the coverage % nor the new lines I do see. Even the code looks empty.

Hi,

Can you share the analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann