How sonar cloud shows the code coverage on the UI reports

Is there a way to visualize in sonar cloud when recently added code has coverage or it does not?

For example, if on the left, next to the line number sonar cloud can indicate if this line is covered or not:

image

Something like:

image

Hey there.

Just to make sure I understand correctly – you can already see code coverage on Bitbucket when looking at the diff of your Pull Request, but when browsing SonarCloud’s decoration (using Code Insights) you lack the coverage information?

Hi Colin,
The above pictures were more intended as an example of what I would like to pursue.
(I missed clarifying that in my question, my bad.)
Right now, I don’t see the coverage when looking at the diff section of the Pull Request:

But at the sonar cloud decoration (within my Pull Request bitbucket side) I can see the coverage:

And when browsing details it is correct.
I just was wondering if is possible for sonar cloud to state in the diff if a line was covered or not.

Hey there.

In the context of PR decoration – no. This is however, available in the SonarCloud UI when browsing a file.

If this is something you would like directly in Bitbucket, it is probably a request best directed to Bitbucket (other tools like Azure DevOps and Gitlab handle this at a platform level).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.