The value of the code line parameter is different, but it is still considered a duplicate code line

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Enterprise edition 9.9

  • how is SonarQube deployed: zip, Docker, Helm
    zip

  • what are you trying to achieve
    We want to know why different lines of code are considered duplicate lines of code.

  • what have you tried so far to achieve this
    We checked the code against the duplicate lines and confirmed that they were different.
    The save function of the favorite.js file, the url is different from the save function of the ReportApply.js file

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

Duplication detection ignores string values. So to analysis, those two block are alike.

If you really need to suppress this, you can set a Duplication Exclusion.

 
HTH,
Ann

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.