Sonar Qube taking single line as multi line for code coverage

Hi Team

  • which versions are you using (SonarQube - 5.0.1, deployed in AWS EC2 instance
  • how is SonarQube deployed: zip
  • what are you trying to achieve - source code single line is being interpreted as multiple lines which reduces the overall coverage for source code and sonar reports gets failed.
  • what have you tried so far to achieve this - same setup is working on on-prem physical servers which shows the correct coverage.

Please help to check.
Thanks,
Bhawna

Hi Bhawna,

Welcome to the community!

Is there actually a red line to the right of the other lines of the multi-line line? (this is hard to describe :sweat_smile:) Could you provide a screenshot of this?

Because when we import a coverage report, we go exactly by what’s in that report. If it says line 6 is covered and line 7 is not, that’s what you’ll see in SonarQube.

 
Ann

Hi Ann,
Please see below snip where in line number 88 to 90 is one line bt sonar is taking it as multiline. Please help to check.
image

Hi,

Thanks for the screenshot. You initially contrasted the behavior you’re seeing to

So could I have the same screenshot from that other server?

 
Thx,
Ann