Skip to content

Releases: pinterest/ktlint

0.25.0

25 Jul 07:56
Compare
Choose a tag to compare

Added

  • package-name rule (#246).
  • --editorconfig=path/to/.editorconfig (#250).
  • Support for end_of_line=native (.editorconfig) (#225).
  • tab -> space * indent_size auto-correction (--format/-F).

Fixed

  • "Unnecessary semicolon" false positive (#255).
  • (cannot be auto-corrected) reporting.
  • OOM in --debug mode while trying to print root=true <- root=false .editorconfig chain.

Changed

  • kotlin-compiler version to 1.2.51 (from 1.2.50).

0.24.0

23 Jun 06:38
Compare
Choose a tag to compare

Added

  • paren-spacing rule (#223).
  • Report location output (#218, #224).
  • An indication that some lint errors cannot be auto-corrected (#219).
  • Git hook to automatically check files for style violations on push (an alternative to existing ktlint --install-git-pre-commit-hook)
    (execute ktlint --install-git-pre-push-hook to install) (#229).
  • Support for end_of_line=crlf (.editorconfig) (#225).

Fixed

  • .editorconfig path resolution
    (you no longer need to be inside project directory for .editorconfig to be loaded) (#207).
  • NPE in case of I/O error (klob@0.2.1).

Changed

  • comment-spacing rule to exclude //noinspection (#212).
  • kotlin-compiler version to 1.2.50 (from 1.2.41) (#226).

0.23.1

04 May 18:41
Compare
Choose a tag to compare

Fixed

  • ClassCastException: cannot be cast to LeafPsiElement (#205)

0.23.0

03 May 03:21
Compare
Choose a tag to compare

Added

  • comment-spacing (#198),
    filename (#194) rules.
  • parameter-list-wrapping left parenthesis placement check (#201).
  • parameter-list-wrapping auto-correction when max_line_length is exceeded (#200).

Fixed

  • "Unused import" false positive (x.y.zNNN import inside x.y.z package) (#204).

Changed

  • kotlin-compiler version to 1.2.41 (from 1.2.40).

0.22.0

22 Apr 21:06
Compare
Choose a tag to compare

Added

  • --apply-to-idea-project (as an alternative to (global) --apply-to-idea) (#178).
  • Check to verify that annotations are placed before the modifiers (#183).
  • Access to PsiFile location information (#194).

Fixed

  • --format commenting out operators (chain-wrapping rule) (#193).

Changed

  • indent rule (continuation_indent_size is now ignored) (#171).
    NOTE: if you have a custom continuation_indent_size (and gcd(indent_size, continuation_indent_size) == 1) ktlint
    won't check the indentation.
  • --apply-to-idea to inherit "Predefined style / Kotlin style guide" (Kotlin plugin 1.2.20+).
  • kotlin-compiler version to 1.2.40 (from 1.2.30).

0.21.0

29 Mar 18:49
Compare
Choose a tag to compare

Changed

  • indent rule to ignore where <type constraint list> clause (#180).

0.20.0

21 Mar 00:46
Compare
Choose a tag to compare

Added

  • Ability to load 3rd party reporters from the command-line (e.g. --reporter=<name>,artifact=<group_id>:<artifact_id>:<version>) (#176).
  • --ruleset/--reporter dependency tree validation.

Fixed

  • Handling of spaces in --reporter=...,output=<path_to_a_file> (#177).
  • +, -, *, /, %, &&, || wrapping (#168).

Changed

  • comma-spacing rule to be more strict (#173).
  • no-line-break-after-else rule to allow multi-line if/else without curly braces.

0.19.0

04 Mar 19:15
Compare
Choose a tag to compare

Changed

  • Lambda formatting: if lambda is assigned a label, there should be no space between the label and the opening curly brace (#167).

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).