Welcome to Ktlint¶
Kotlin linter in spirit of feross/standard (JavaScript) and gofmt (Go).
Features¶
- No configuration required
ktlintaims to capture the Kotlin coding conventions and Android Kotlin Style Guide. In some aspectsktlintis a bit more strict*. - Rule sets
ktlintoffers astandardrule set. Next to this, it is easy to provide custom rule sets. - .editorconfig
Some rules do allow further configuration, but in all cases a reasonable default is set when not provided.ktlintprimarily uses the .editorconfig file to read default.editorconfig, IntelliJ IDEA specific and Ktlint specific properties. - Disable rules
If need be, rules can be disabled easily*. - Built-in formatter
Most lint violations don't need to be fixed manually.ktlinthas a built-in formatter which fixes violations when possible. Some violations can not be fixed in a deterministic way, and need manual action. - Customizable output
Several reporters are available out-of-the-box:
plain(+plain?group_by_file),plain-summary,json,htmlandcheckstyle. It's also easy to create a custom reporter. - Executable jar and native binaries
ktlintis released as an executable jar with all dependencies included and as native executables for Linux, macOS, and Windows.
Legal¶
This project is not affiliated with nor endorsed by JetBrains.
All code, unless specified otherwise, is licensed under the MIT license.
Copyright © 2026 Ktlint
Copyright © 2019-2026 Pinterest, Inc.
Copyright © 2016-2019 Stanley Shyiko.