Duplicated code in the imports section triggered by sonar-kotlin

kotlin

(Madalina Sultan) #1

Hi,

After upgrading to the new sonar-kotlin plugin, I noticed a new issue complaining about duplicated code in the imports section of a Kotlin file.

I have two distinct files for which the imports section looks exactly the same, even if the actual logic inside is different. Sonar marks this as code duplication. I think the imports section should not be taken into account.

Sonar Version 6.7.4 (build 38452)
sonar-kotlin plugin: 1.0 (build 928)

Regards,
Madalina


(Pierre-Yves Nicolas) #2

Hi,

Thanks for the feedback!
We are aware of this limitation and we will try to fix it in the next release:
https://jira.sonarsource.com/browse/SONARSLANG-62

Regards,
Pierre-Yves