afaik Sonarqube uses Detekt under the hood for Kot...
# detekt
s
afaik Sonarqube uses Detekt under the hood for Kotlin code, so no need to replace it
m
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/
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
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
@Mike @Michael Friend is there any difference between importing detekt results into SonarKotlin vs. using detekt’s sonar-kotlin plugin?
m
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