SonarLint not analyzing Kotlin files

Please provide

  • Operating system: Win11x64
  • SonarLint plugin version: 10.8.0.79133
  • IntelliJ version: IntelliJ IDEA 2024.1.2 (Ultimate Edition
  • Programming language you’re coding in: Kotlin + Java
  • Is connected mode used: Yes
    • Connected to SonarCloud or SonarQube (and which version): SonarQube (version unknown)

I have a mixed-code project with Kotlin and Java files under src/main/java. When I click on a Kotlin file, I got no reports, works only on Java files. In the log it says

 [2024-08-07T11:41:58.399] [Progress of the text and secrets analysis] INFO sonarlint - 1/1 source file has been analyzed
 [2024-08-07T11:41:58.4] [sonarlint-analysis-engine] INFO sonarlint - Analysis detected 0 issues and 0 Security Hotspots in 280ms

but it detects no issues, no matter what I do:

It also reports my an overall coverage of 0.0%, seems like it does just not detect anything.

EDIT: Also created a file under src/main/kotlin/…/Foo.kt, same result, no issues detected.

Hello @rupert-jung-mw, thanks for reaching out to us!

Could you please enable the SonarLint logs and share them with us?

It also reports my an overall coverage of 0.0%, seems like it does just not detect anything.

SonarLint does not display or compute code coverage. IntelliJ should however provide a solution for this.

Here are the logs after a full analysis of the project:

sonar_logs.zip (100.6 KB)

Issues appear and then disappear after a very short time.

Thank you Rupert. Regarding the issue of issues disappearing, and as mentioned in this thread, we will proceed to fix the issue and release a new version.

Hey @rupert-jung-mw, we have just released SonarLint 10.8.1. Could you please update and check if you notice any improvement? The problem of issues appearing and disappearing should be fixed.

Hello @nicolas.quinquenel ,

my current version is 10.8.0.79133. There is no update listened yet. Will try it, as soon as it becomes availble.

EDIT: Update 10.8.1.79205 became available under updating to IntelliJ 2024.1.6. Issue is now resolved :slight_smile:

I’m glad your issue got resolved @rupert-jung-mw, thank you for letting us know!

If you enjoy using SonarLint, we would greatly appreciate it if you could reconsider updating your review on our marketplace page.

In any case, thank you for using SonarLint! :sonarlint:

Hi there,

unfortunately I could not edit the review there, but I deleted it.

1 Like

Thank you, @rupert-jung-mw! Although, the note is still considered even if the review was removed.

Hi, I wrote a new review. Hope that fixes it.

Hi @rupert-jung-mw,

thanks for the review and that you like SonarLint. This is much appreciated :pray:

Best,
Tobias