Duplicated Lines (%) on New Code - duplicate lines not highlighted in detailed view

  • Github
  • Javascript
  • Pull request # 1861
  • Duplicated Lines (%) on New Code
  • On a recent pull request (for project inKindCards_web), we noticed that a JS file was being flagged as having 20.8% duplicated lines % in new code, but when we clicked into the file in question to view the duplicates, no lines were highlighted (see screenshots). Can someone clarify why no lines are being highlighted? Not sure if this is a bug or something else.


Hey there.

I can’t quite tell from your screenshot – do you see the indicator here?

Hi Colin, no, there is no indicator to show the duplicated lines - that’s the issue :smile:

Thanks. We’ve had issues like this before…

but I know that specific case was fixed.

I’m going to reach out to you via PM for some private information.

I’m having the same issue, but I work w/ sensitive information so I can’t do a screenshot.

Hey @kmarler18

In the case of @andrew-tru, they had not expanded the full file source and scrolled to the right lines. Maybe that’s the case for you?

In any case, we recognize that users have reported finding it difficult to identify duplicate code, particularly in dark mode. We have an open ticket to address that.

Thank you for that information Colin. Andrew-tru’s root cause doesn’t seem to be the same as mine b/c as far as I can tell, my file is fully expanded and I was scrolling to the correct lines. Strangely, the gray highlights that reveal the duplicate code now appear to be showing today when they weren’t on Friday! I’ll be curious to see if the issue crops up again when I submit my next pull request. Would you be willing to send me a link to the open ticket you are referring to?

The issue tracker isn’t public, unfortunately :frowning:

Understood. Do you know what version of SonarQube the fix will be in?

Well, this thread was created for SonarQube Cloud (which, as a SaaS, is not versioned).

If you’re facing the issue on SonarQube Server, it’s probably a different issue (the issue here is specific to Dark Mode, which is not a feature that SonarQube Server has).

So at this point, I’m not sure you’re really facing the same issue. :smiley: You’d have to describe it more, preferably in a new thread, and offer some more details (yes, that might mean redacted screenshots).

Gotcha. We are in fact on SonarQube Server… I just confirmed that with my Dev Ops team. Sorry for the confusion.

I created a new post here. Let me know if that’s the best place to put it.