Skip to content

Releases: pinterest/ktlint

0.11.1

26 Oct 18:45
Compare
Choose a tag to compare

Fixed

  • --reporter's output handling (previously parent directory was expected to exist) (#97).

0.11.0

25 Oct 11:08
Compare
Choose a tag to compare

Added

  • no-blank-line-before-rbrace rule (#65).

Fixed

  • Redundant space inserted between } and :: (curly-spacing).

0.10.2

25 Oct 09:57
Compare
Choose a tag to compare

This release contains changes that were meant for 0.11.0 and so it was retagged as such.

0.10.1

22 Oct 11:08
Compare
Choose a tag to compare

Fixed

  • Redundant space inserted between } and [key]/(...) (curly-spacing) (#91).

0.10.0

11 Oct 16:26
Compare
Choose a tag to compare

Added

  • Git hook to automatically check files for style violations on commit
    (execute ktlint --install-git-pre-commit-hook to install).
  • Ability to specify multiple reporters
    (output can be controlled with --reporter=<name>,output=<path/to/file>) (#71).
  • Support for indent_size=unset (.editorconfig) (#70).

Fixed

  • ( { formatting
    (previously both ( { and ({ were accepted as correct, while only ({ should be) (curly-spacing rule) (#80).
  • if\nfn {}\nelse formatting (curly-spacing rule).
  • max_line_length=off & max_line_length=unset handling (.editorconfig).

Changed

  • kotlin-compiler version to 1.1.51 (from 1.1.3-2).
  • ktlint --apply-to-idea to include OPTIMIZE_IMPORTS_ON_THE_FLY=true.

0.9.2

01 Sep 20:38
Compare
Choose a tag to compare

Fixed

  • : Unit = formatting (: Unit is no longer dropped when = is used) (#77).

0.9.1

31 Jul 05:37
Compare
Choose a tag to compare

Fixed

  • ${super.toString()} linting (string-template rule) (#69).

0.9.0

24 Jul 06:17
Compare
Choose a tag to compare

Added

  • Reporter API.
    ktlint comes with 3 built-in reporters: plain (default; ?group_by_file can be appended to enable grouping by file (shown below)), json and checkstyle.
$ 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 if insert_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 makes ktlint 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 in ktlint (as ktlint --apply-to-idea)).

0.8.3

19 Jun 20:35
Compare
Choose a tag to compare

Fixed

  • "Missing spacing after ";"" at the end of package declaration (#59).
  • "Unused import" false positive (setValue) (#55).
  • get/setter spacing (#56).

0.8.2

06 Jun 18:03
Compare
Choose a tag to compare

Fixed

  • "Unused import" false positive (getValue) (#54).