common-kotlin:DuplicatedBlocks should ignore imports

kotlin

(Andrei Petcu) #1

SonarQube™ technology is powered by SonarSource SA Version 6.7.4 (build 38452)
SonarKotlinLanguages 1.0.1 (build 965)

package com.mycompany;

import org.apache.commons.io.FileUtils
import org.w3c.dom.Document
import java.io.File
import java.io.StringWriter
import javax.inject.Inject
import javax.inject.Singleton
import javax.xml.transform.TransformerFactory
import javax.xml.transform.dom.DOMSource
import javax.xml.transform.stream.StreamResult
import javax.xml.transform.stream.StreamSource
Wrap code around triple quote ``` for proper formatting

I initially reported it here by mistake https://github.com/arturbosch/sonar-kotlin/issues/76#event-1839130687


(Andrei Petcu) #2

Hmm… I just found this https://jira.sonarsource.com/browse/SONARSLANG-62

Seems like it’s the same thing but it is fixed. No clear version where it got fixed.


(Pierre-Yves Nicolas) #5

The “fix version” was missing on SONARSLANG-62, I corrected it. Thanks.
That should be released early October, as part of SonarKotlin 1.1.


(Alexandre Gigleux) #6

To close this thread, SONARSLANG-62 was fixed and it is available as part of SonarKotlin 1.2.1


(Andrei Petcu) #7

Thank you! I updated. Will report back if this will appear again.