Import considered as duplicated lines in SonarQube


A PR failing at SonarQube check due to duplicated lines in new code.
The thing is the duplicated code is just module imports which don’t make sense to be an issue.
Another issue is there is no legit workaround, as these are not identified as issues, that’s why there’s no way to mark it as “False Positive” or “Won’t Fix”.

Apparently, Sonar fixed this behaviour for Kotlin imports, but alas not for TS: [SONARSLANG-62] Exclude Kotlin "import" declarations from duplication detection - SonarSource. Hence, please open an issue to patch this behaviour as you already did for Kotlin.

NB: We’re using SonarQube Developer Edition v 8.7 (build 41497), TypeScript Quality Profile.



Ticket is created Exclude import statements from duplication computation · Issue #2920 · SonarSource/SonarJS · GitHub, thanks!

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