Duplication line could not be seen on PR

We have a quality get on PR regarding duplication line…
One of the PR is tagged with duplication code:

BUT it is impossible to understand where it is, there is NO gray line on the border of the file (as we can see on main branch regarding duplication)

It seems that the duplication code is not well shown on PR, that make VERY difficult the analyse and the correction of this error.


Hey there.

That’s odd – I am able to view the duplicated code on a PR in SonarCloud

If you take any of the files where duplication is reported and try an API call like this:


(the value for key is the same value as selected in the URL when you’re browsing the UI)

Do you see any lines marked as duplicated:"true"?

Can you also confirm what language these files are?

Yes I see some and with isNew: true:

BUT nothing on sonar for this line 549


And just to make sure we have the full picture, can you confirm this point?

The file is in C++


I can’t reproduce this on a C++ repo with a pull request (with duplication). Take for example this public project.

Ill reach out for some private details.

I think the difference is that you have duplication in the same file, here I think we have duplication from another file THAT IS NOT part of the PR, so I suspect that it is the issue, has the file is not part of the PR it could not show it, and duplication is not usable :frowning: