detekt
This is BETA. The behavior of this tool might change.
Supported Version | Language | Website |
---|---|---|
1.15.0 | Kotlin | https://detekt.github.io/detekt |
detekt is a linter which code smell analysis for your Kotlin projects.
Getting Started
To start using detekt, enable it in your repository settings, and put a configuration in sider.yml
.
Using detekt
You can use detekt without any configuration, but we recommend to make a configuration.
Put the detekt
key in sider.yml
to customize the execution of detekt.
linter:
detekt:
baseline: "baseline.xml"
config:
- "path/to/detekt-config.yml"
- "path/to/another/detekt-config.yml"
config-resource: []
disable-default-rulesets: false
excludes:
- "**/excludes_dir/**"
- "**/another/excludes_dir/**"
includes: []
input:
- "src/"
Configuration
You can customize your detekt analysis using sider.yml
.
Name | Type | Default |
---|---|---|
root_dir | string | - |
jvm_deps | string[][] | [] |
baseline | string | - |
config | string , string[] | [] |
config-resource | string , string[] | [] |
disable-default-rulesets | boolean | false |
excludes | string , string[] | [] |
includes | string , string[] | [] |
input | string , string[] | . |
For more details about the options, see the official documentation.
baseline
This option allows you to specify a baseline XML file path. If the file is passed, only new code smells not in the baseline are reported.
config
This option allows you to specify your configuration file(s) path for detekt.
config-resource
This option allows you to specify the configuration resource path(s) on detekt's classpath.
disable-default-rulesets
This option allows you to specify whether disables the default rule sets or not.
excludes
This option allows you to specify glob pattern(s) of paths to exclude from the analysis.
includes
This option allows you to specify glob pattern(s) of paths to include in the analysis.
input
This option allows you to specify input path(s) to analyze.