Not able to find out lines not covered in new code

whenever there is a new code checked in(eg: 10 pull requests), we can see the sonar report for number of lines not covered in new code. When we click on this number it takes to file where the code is not covered. However we are not able to make out exact lines which are not covered. The file shows covered and not covered lines but there is no way to find out the lines not covered only in new code that was checked in.

Hi @shravanipandarmish-g

On your code file, you should see new code highlighted in yellow. Code that is both new and not covered will be in darker yellow, with the red marker in the margin:

Does that solve your problem? Would you expect something else?

Hi Laura,

Yes we see new code in Yellow. But in few of our controllers we see whole code in yellow.
What is exactly considered as new code could you please elaborate.
Thank You.

Hi @shravanipandarmish-g,

New code is:

  • Code that is not present at the start of your Leak Period.
  • Code that is present at the start of your Leak Period, but was changed.

So if a controller is completely new, all its lines will be yellow. If you completely rewrite a controller, all its lines will be yellow, too. If you only touch parts of a controller, only the affected lines will be yellow.

There are several ways to determine the start of a Leak Period. You can read the documentation here. If you’re not yet familiar with the concept of the Leak Period, I highly recommend you read the linked page. It’s an essential concept of our products, and will greatly help improve code quality over time.

(I moved this topic to the support forum, as it’s clearly not a feature request. Please use the appropriate forums, which will help us reply faster)

Thank You Wouter.