Sonarqube Support


#1

Is any official support for integration within SonarQube for Kotlin or plans to do so?

I’ve found some unofficial plugins but I was wondering if there are plans to support it at any point.


#2

Yes, we do plan to provide an official plugin later this year.


#3

Will this plugin be approved / ‘Supported by SonarSource’ by Sonar themselves? Or will this be just released by your team and hoping they mark it as ‘supported’?


#4

At this time we haven’t done any work on the plugin or discussed it with Sonar, so I have no idea what kind of status it will eventually have.


#5

any third party plugin to integrate sonarQube for Kotlin


#6

Hey Kotlin team!
Any updates here? We’re holding on Kotlin until this happens. Started playing with Kotlin on my dummy apps.

Edit: Tagging @yole Thanks!
Edit2: stock started


#7

Everything stated above is still true. Just to be clear: the lack of which type of analysis exactly prevents you from using Kotlin? Maybe it’s possible to use other tools to perform this type of analysis?


#8

For what it’s worth, we’re longtime users of Kotlin and struggle with this. We have a legacy Java codebase that we instrument for code coverage and static analysis with Sonar. Whenever we convert a class to Kotlin it effectively goes dark from the point of view of Sonar, because we have to exclude them or the sonar build breaks. It doesn’t make sense for us to set up alternate tooling just to measure Kotlin code, because we want to view the codebase holistically. We do hope someone will figure out how to get Kotlin to play nice with Sonar.


#9

We too, we want to shift to Kotlin, but we have strict rules of code coverage and technical debt. Cannot leave java if our Sonar is not analyzing our code.


#10

We’ve already enabled Kotlin, with the stable release of AndroidStudio3 and the android-gradle-plugin 3.0.
I found this Sonar plugin for Kotlin on GitHub:

It’s working very well so far. Without it, I had the same problem mentioned by @rlscharer of Kotlin classes going dark. But now I’m seeing lines of code and code coverage.

Android Gradle Plugin 3.0 requires Sonar Plugin 2.5, but there’s a known issue solved for Sonar Plugin 2.6: 2.6-rc1 available, no issues so far.

cc: @yole


#11

Hi @yole! Any news on this? An official and well supported kotlin plugin would be appreciated

Thanks!


#12

@henry I have also installed the Sonar-Kotlin plugin and see the analysis result.

BUT I’m not seeing coverage results. Jacoco is running, and I can see the html reports in my Gradle output. Did you do anything from a configuration perspective in Sonarqube or your build to accomplish this?

Any assistance/advice greatly appreciated.


#13

Once the plugin is available, it will be announced on the Kotlin blog. I don’t have any other news to share at this time.


#14

Hi! @yole do you have any update on it? I read up on the discussion that you planned to provide an official plugin the last year.
We want to start coding in Kotlin but this one is the main requirement of the client…
Really thanks in advance!


#15

Would love an update on this as well. Proper Sonarqube support is one of the issues that have to be solved before my team will consider moving to Kotlin.


#16

Hello @yole,
do you have any updates for us?

Would be good to know if it is still on your roadmap and if so when
you are planning to release something.

Thanks!


#17

Once the plugin is available, it will be announced on the Kotlin blog. I don’t have any other news to share at this time.


#18

Hi @yole, I understand that JetBrains has to prioritize this with everything else in the backlog but I’m adding my vote to hopefully see this plugin soon. Look forward to seeing a blog post announcing this.

Thanks,
Thomas