This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

See latest version
Start Free
9.7 | Analyzing source code | Languages | Kotlin

Kotlin

On this page

Language-specific properties

You can discover and update Kotlin-specific properties in Administration > General Settings > Languages > Kotlin.

Kotlin analysis and bytecode

If you are not using the SonarScanner for Gradle or SonarScanner for Maven, it is strongly recommended to provide the paths of all dependency binaries used by the project in order to improve the analysis accuracy. You can provide these using the sonar.java.libraries property (note that this property is shared with the Java analyzer and as such has java in its name). This is a list of comma-separated paths to files with third-party libraries (JAR or Zip files) used by your project. Wildcards can be used: sonar.java.libraries=path/to/Library.jar,directory/**/*.jar

Note that if you use the SonarScanner for Gradle or SonarScanner for Maven to scan your code, these scanners will auto-detect the value for this property. Thus, you don't need to provide it.

Specifying the Kotlin source code version

You can explicitly define which Kotlin version the analyzer should analyze your code based on. Provide the desired version in the format X.Y as value to the sonar.kotlin.source.version property (e.g. 1.7).

Issue tracker

Check the issue tracker for this language.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License