I use the current version of Sonar with JaCoCo plugin version 1.0.0 and Sonar Kotlin plugin 1.1.
The Sonar scanner I use is version 184.108.40.2064.
When I run Sonar (locally or via CI), I get erorrs like the following:
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:220.127.116.114:sonar (default-cli) on project vcs: Line 79 is out of range in the file src/main/kotlin/example/config/CamelNamingStrategy.kt (lines: 78) -> [Help 1]
This error is based on Kotlin inlining information when it compiles classes:
The Kotlin compiler uses line numbers beyond the file length to denote inlined functions. It has to do that as Java debug information only allows specifying a single source file per class. For Sonar, this has to be “reverted” or at least made not crash on out of bounds line numbers.
It seems that the error is related to the following task in the Sonar Jira board: https://jira.sonarsource.com/browse/SONARSLANG-19 - in my opinion the CoreMetrics.EXECUTABLE_LINES_DATA should be raised for Kotlin files [according to the lines found in the .class file].