# Kotlin

## Language-specific properties <a href="#language-specific-properties" id="language-specific-properties"></a>

You can discover and update Kotlin-specific [analysis-parameters](https://docs.sonarsource.com/sonarqube-server/10.3/analyzing-source-code/analysis-parameters "mention") in **Administration > General Settings > Languages > Kotlin**.

## Kotlin analysis and bytecode <a href="#analysis-and-bytecode" id="analysis-and-bytecode"></a>

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 <a href="#source-code-version" id="source-code-version"></a>

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`).

## Skipping unchanged files <a href="#skipping-unchanged-files" id="skipping-unchanged-files"></a>

Starting from November 2022, and by default, the Kotlin analyzer optimizes the analysis of unchanged files in pull requests. In practice, this means that the analyzer does not perform an analysis on any file that is the same as on the PR’s target branch. As long as the project is configured in such a way that the analyzer is able to find the project’s binaries, this should not impact the analysis results.

If you wish to disable this optimization, you can set the value of the analysis parameter `sonar.kotlin.skipUnchanged` to `false`. Leaving the parameter unset lets the server decide whether the optimization should be enabled.

## Related Pages <a href="#related-pages" id="related-pages"></a>

* [external-analyzer-reports](https://docs.sonarsource.com/sonarqube-server/10.3/analyzing-source-code/importing-external-issues/external-analyzer-reports "mention") (AndroidLint, Detekt and Ktlint)
* [overview](https://docs.sonarsource.com/sonarqube-server/10.3/analyzing-source-code/test-coverage/overview "mention") (JaCoCo)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/10.3/analyzing-source-code/languages/kotlin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
