Coverage on new code - show code diff


I would really like it if the “Coverage on New Code” page for a file only showed the code diff with coverage info.

Currently the entire file is shown, which in our case can be up to 1,000 lines. This means that we spend a lot of time searching for the blue, “new code”, flagged lines in the coverage view to see which did, and which did not, get covered.

It would be really helpful to show the code diff in a fashion similar to github, collapsing away all the unchanged code and only showed the the new code and surrounding context, and the coverage for those lines.

Sorry if this feature has already been discussed. I searched and couldn’t find a similar discussion. We’re using SonarCloud.

Many thanks,

Hello @jonavos ,

Welcome to the community!

Thank you for sharing this feedback, I’ve added it internally. We are looking into various changes around Coverage so your insights are very welcome. You can follow this card on our public roadmap to get any updates on the topic.

1 Like