- Integrates detekt for code analysis
- Default quality profile
- Syntax highlighting
- Supports SonarQube 5.6.7 and 6.7
- Supports detekt's
Sonar-kotlin is not yet uploaded to the
git clone https://github.com/arturbosch/sonar-kotlin
cp build/libs/sonar-kotlin-[enter_version].jar $SONAR_HOME/extensions/plugins
Configurations and Baselines (and Filters)
Best ways to get started is to configure the
detekt-gradle-plugin in your project and use its
detektGenerateConfigcopies the default configuration file which you can use to turn on and off rules and set appropriate threshold values for some rules.
detektBaselineanalyzes your project and generates a baseline xml file with all your current findings. This findings won't get reported anymore in sonar.
To make use of this features, you have to set up some properties:
Detekt path filters support multiple regex entries by adding a
, for separating.
Detekt yaml configuration path also supports multiple configuration files where the first entered override some
values of the later added config files.
Sonar analyzes each module individually which makes it harder to search for your config files. If you use relative paths, sonar-kotlin first tries to find the provided path inside this module and if it can't find it, we are searching for the file in the parent folder. This leads to the limitation that only projects with sub-projects of depth 1 are supported. If you need more config files in your project hierarchies, provide them in the sub-projects with the same relative path available.
As mentioned/used in ...