ktlint v0.9.0 Release Notes
Release Date: 2017-07-23 // almost 7 years ago-
โ Added
- ๐ [Reporter](ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/Reporter.kt) API.
ktlint
comes with 3 built-in reporters:plain
(default;?group_by_file
can be appended to enable grouping by file (shown below)),json
andcheckstyle
.$ ktlint --reporter=plain?group_by_file path/to/file.kt 1:10 Unused import. 2:10 Unnecessary "Unit" return type. path/to/another-file.kt 1:10 Unnecessary semicolon.
- ๐ string-template,
๐ no-empty-class-body,
๐ max-line-length (#47),
final-newline (activated only ifinsert_final_newline
is set in.editorconfig
(under[*.{kt,kts}]
)) rules. --limit
CLI option (e.g. use--limit=10
to limit the number of errors to display).- ๐
--relative
CLI flag which makesktlint
output file paths relative to working directory (e.g.dir/file.kt
instead of/home/269/project/dir/file.kt
).
๐ Changed
- ๐ฅ BREAKING: JDK version to 1.8 (as a result of upgrading
kotlin-compiler
to 1.1.3-2 (from 1.1.0)). - File matching (offloaded to klob).
๐ Deprecated
- โก๏ธ
--ruleset-repository
and--ruleset-update
CLI arguments in favour of--repository
and--repository-update
๐ respectively (--ruleset-*
will be removed in 1.0.0). - ๐
ktlint-intellij-idea-integration
binary
๐ (Intellij IDEA integration task is now included inktlint
(asktlint --apply-to-idea
)).
- ๐ [Reporter](ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/Reporter.kt) API.