Skip to content

Releases: pinterest/ktlint

0.18.0

01 Mar 18:12
Compare
Choose a tag to compare

Added

  • Java 9 support (#152).

Changed

  • kotlin-compiler version to 1.2.30 (from 1.2.20).

0.17.1

01 Mar 01:07
Compare
Choose a tag to compare

Fixed

  • Internal Error (parameter-list-wrapping) when indent_size=unset (#165).

0.17.0

28 Feb 23:05
Compare
Choose a tag to compare

Fixed

  • +/- wrapping inside catch block, after else and if (..) (#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

27 Feb 17:13
Compare
Choose a tag to compare

Fixed

  • Handling of negative number condition in when block (#160).

0.16.0

27 Feb 08:21
Compare
Choose a tag to compare

Added

  • parameter-list-wrapping rule (#130).
  • +, -, *, /, %, &&, || wrapping check (now part of chain-wrapping rule).

Fixed

  • Unused componentN import (where N > 5) false positive (#142).
  • max-line-length error suppression (#158).

Changed

0.15.1

15 Feb 03:20
Compare
Choose a tag to compare

Fixed

  • Race condition when multiple rules try to modify AST node that gets detached as a result of mutation (#154).

0.15.0

18 Jan 16:36
Compare
Choose a tag to compare

Added

  • no-line-break-after-else rule (#125).

Changed

  • kotlin-compiler version to 1.2.20 (from 1.2.0).

0.14.0

30 Nov 19:30
Compare
Choose a tag to compare

Changed

Fixed

  • Maven integration (#117).

0.13.0

28 Nov 18:14
Compare
Choose a tag to compare

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 contains root=true).
  • max-line-length rule to assume max_line_length=100 when ktlint --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 to max-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.

0.12.1

13 Nov 23:45
Compare
Choose a tag to compare

Fixed

  • A conflict between org.eclipse.aether:aether-*:1.1.0 and org.eclipse.aether:aether-*:1.0.0.v20140518 (#100).