0.9.0
Added
- Reporter API.
ktlintcomes with 3 built-in reporters:plain(default;?group_by_filecan be appended to enable grouping by file (shown below)),jsonandcheckstyle.
$ 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_newlineis set in.editorconfig(under[*.{kt,kts}])) rules. --limitCLI option (e.g. use--limit=10to limit the number of errors to display).--relativeCLI flag which makesktlintoutput file paths relative to working directory (e.g.dir/file.ktinstead of
/home/269/project/dir/file.kt).
Changed
- BREAKING: JDK version to 1.8 (as a result of upgrading
kotlin-compilerto 1.1.3-2 (from 1.1.0)). - file matching (offloaded to klob).
Deprecated
--ruleset-repositoryand--ruleset-updateCLI arguments in favour of--repositoryand--repository-update
respectively (--ruleset-*will be removed in 1.0.0).ktlint-intellij-idea-integrationbinary
(Intellij IDEA integration task is now included inktlint(asktlint --apply-to-idea)).