afaik Sonarqube uses Detekt under the hood for Kotlin code, so no need to replace it
m
Mike
04/02/2020, 1:13 PM
Newer versions (6ish or so) have introduced a SonarKotlin plugin, so they're working on native support of Kotlin. Simplifies configuration of Sonar for scanning Kotlin code.
I believe it will also display results from Detekt, but it's been awhile since that update took place, so I don't recall specifics.
https://docs.sonarqube.org/latest/analysis/languages/kotlin/
Mike
04/02/2020, 1:14 PM
Prior to this, you had to install the Sonarqube Detekt plugin manually so that it would use Detekt results. So that required an accommodating administrator to install something built straight from Github.
👍 1
m
Michael Friend
04/02/2020, 2:35 PM
SonarQube uses a different official plugin for kolin that is a bit lacklust atm, but it can accept detekt reports to integrate findings from detekt on its own
g
Gopal S Akshintala
04/03/2020, 2:19 AM
@Mike@Michael Friend is there any difference between importing detekt results into SonarKotlin vs. using detekt’s sonar-kotlin plugin?
m
Michael Friend
04/03/2020, 3:58 PM
From the documentation for the detekt sonar plugin it say that since it uses the same id as the official kotlin plugin so you cant have them both at the same time so i imagine set up is a bit more difficult than just setting the xml report property for detekt. Other than that it should be about the same but i havent used the plugin