Skip to main content

ktlint

note

This is BETA. The behavior of this tool might change.

Supported VersionLanguageWebsite
0.41.0Kotlinhttps://ktlint.github.io

ktlint is a linter with built-in formatter for Kotlin programming language.

Getting Started#

To start using ktlint, enable it in your repository settings.

Configuration#

You can customize your ktlint analysis using sider.yml as follows:

linter:  ktlint:    target:      - "src/**/*.kt"      - "!src/**/*Test.kt"      - "test/"    ruleset:      - custom_ruleset.jar    disabled_rules:      - "no-wildcard-imports"      - "indent"    experimental: true
NameTypeDefault
root_dirstring-
dependenciesstring[], map[]-
targetstring, string[][]
rulesetstring, string[][]
disabled_rulesstring, string[][]
experimentalbooleanfalse

target#

This option allows you to specify glob patterns of files to analyze. If omitted, Sider analyzes all Kotlin files in your repository.

ruleset#

This option allows you to specify URLs to rulesets you want to enable.

disabled_rules#

This option allows you to specify rule names to disable.

experimental#

This option allows you to use the experimental rules.