Why is empty lines considered as duplicated lines in SonarQube

Hi,

++ Adding up to my previous posted query - Qulaity gate for PR analysis and suggested by @ganncamp I am creating a new ticket.

I found that the empty lines are considered as duplicated lines in my codebase.

We have set the duplicated lines QG threshold to 3%, as SonarQube is also checking the empty lines, and considering it as duplicated lines my QG is failing.

Adding @sohailshaikh001 for followup.
Thanks,
Abhishek

Hi Team, any update my Sonar is considering empty lines as duplicated lines?

Any updates?

@aanvekar001

I agree that sonar should ignore whitespace, but is it possible that these lines have a mix of spaces and tabs, or mixed carriage returns that would flag them differently?

I don’t remember seeing this issue in our codebase so that’s why I’m suspecting your lines might be a bit special.

Hi Abhishek,

Are we talking about Java here?

 
Ann

Hi Ann, Specifically we encountered this with APEX code(Salesforce).

Hi, is there any update?