Releases: pinterest/ktlint
Releases · pinterest/ktlint
0.18.0
0.17.1
0.17.0
Fixed
+
/-
wrapping insidecatch
block, afterelse
andif (..)
(#160).- Multi-line parameter declaration indentation (#161).
- Expected indentation reported by
indent
rule.
Changed
- Error code returned by
ktlint --format/-F
when some of the errors cannot be auto-corrected (previously it was 0 instead of expected 1) (#162).
0.16.1
0.16.0
Added
parameter-list-wrapping
rule (#130).+
,-
,*
,/
,%
,&&
,||
wrapping check (now part ofchain-wrapping
rule).
Fixed
- Unused
componentN
import (where N > 5) false positive (#142). - max-line-length error suppression (#158).
Changed
modifier-order
rule to match official Kotlin Coding Conventions (#146)
(override
modifier should be placed beforesuspend
/tailrec
, not after)
0.15.1
0.15.0
0.14.0
0.13.0
Added
no-line-break-before-assignment
(#105),
chain-wrapping
(#23)
(when wrapping chained calls.
,?.
and?:
should be placed on the next line),
range-spacing
(no spaces around range (..
) operator) rules.--print-ast
CLI option which can be used to dump AST of the file
(see README / Creating a ruleset / AST for more details)--color
CLI option for colored output (where supported, e.g. --print-ast, default (plain) reporter, etc)
Changed
.editorconfig
property resolution.
An explicit[*.{kt,kts}]
is not required anymore (ktlint looks for sections
containing*.kt
(or*.kts
) and will fallback to[*]
whenever property cannot be found elsewhere).
Also, a search for .editorconfig will no longer stop on first (closest).editorconfig
(unless it containsroot=true
).max-line-length
rule to assumemax_line_length=100
whenktlint --android ...
is used
(per Android Kotlin Style Guide).kotlin-compiler
version to 1.2.0 (from 1.1.51).
Fixed
no-empty-class-body
auto-correction at the end of file (#109).max-line-length
rule when applied to KDoc (#112)
(previously KDoc was subject tomax-line-length
even though regular comments were not).- Spacing around
=
in @annotation|s (op-spacing
). - Spacing around generic type parameters of functions (e.g.
fun <T>f(): T {}
->fun <T> f(): T {}
). no-consecutive-blank-lines
not triggering at the end of file (when exactly 2 blank lines are present) (#108)indent
continuation_indent_size % indent_size != 0
case (#76)indent
rule skipping first parameter indentation check.final-newline
rule in the context of kotlin script.- Git hook (previously files containing space character (among others) in their names were ignored)
- Exit code when file cannot be linted due to the invalid syntax or internal error.