Skip to content

Releases: pinterest/ktlint

0.32.0

22 Apr 22:11
6d0a06f
Compare
Choose a tag to compare

Note: This release will not be updated in the homebrew-ktlint tap; we will be opening a PR to make ktlint part of the core Homebrew formulae.

Added

  • experimental/import-ordering rule (#189).
    Use ktlint --experimental to enabled.
  • Support for Kotlin 1.3.30
  • Build now compatible with jitpack

Fixed

  • Incorrectly flagging a missing newline for functions with no parameters (#327).
  • Semicolons now allowed in KDocs (#362).
  • Spaces now disallowed after super (#369).
  • Annotations in function parameters now checked for indentation (#374]

Changed

  • Code now lives in com.pinterest package
  • groupId now com.pinterest
  • Custom ruleset META-INF.services file must be renamed to com.pinterest.ktlint.core.RuleSetProvider

0.31.0-SNAPSHOT

16 Apr 23:27
cab2019
Compare
Choose a tag to compare
0.31.0-SNAPSHOT Pre-release
Pre-release

Snapshot release which includes Kotlin 1.3.30 support.

0.31.0

11 Mar 06:41
Compare
Choose a tag to compare

Added

  • dot-spacing rule (#293).
  • experimental/indent rule (#338).
    Use ktlint --experimental to enable.

Fixed

  • Spacing check around < & > operators.

Changed

  • no-multi-spaces rule (horizontal alignment of comments is no longer allowed) (#269).
  • colon-spacing rule (: must not appear at the beginning of the line).
  • package-name rule (disabled until #208 is resolved).
  • --print-ast to output com.github.shyiko.ktlint.core.ast.ElementType.* as node.elementType, e.g.
$ echo 'fun f() {}' | ./ktlint/target/ktlint --print-ast --color --stdin
1: ~.psi.KtFile (FILE)
1:   ~.psi.KtPackageDirective (PACKAGE_DIRECTIVE) ""
1:   ~.psi.KtImportList (IMPORT_LIST) ""
1:   ~.psi.KtScript (SCRIPT)
1:     ~.psi.KtBlockExpression (BLOCK)
1:       ~.psi.KtNamedFunction (FUN)
1:         ~.c.i.p.impl.source.tree.LeafPsiElement (FUN_KEYWORD) "fun"
1:         ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " "
1:         ~.c.i.p.impl.source.tree.LeafPsiElement (IDENTIFIER) "f"
1:         ~.psi.KtParameterList (VALUE_PARAMETER_LIST)
1:           ~.c.i.p.impl.source.tree.LeafPsiElement (LPAR) "("
1:           ~.c.i.p.impl.source.tree.LeafPsiElement (RPAR) ")"
1:         ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " "
1:         ~.psi.KtBlockExpression (BLOCK)
1:           ~.c.i.p.impl.source.tree.LeafPsiElement (LBRACE) "{"
1:           ~.c.i.p.impl.source.tree.LeafPsiElement (RBRACE) "}"
1:       ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) "\n"

   format: <line_number:> <node.psi::class> (<node.elementType>) "<node.text>"
   legend: ~ = org.jetbrains.kotlin, c.i.p = com.intellij.psi
  • kotlin-compiler version to 1.3.21 (from 1.3.20).

Removed

  • Dependency on JCenter (#349).

0.0.0-SNAPSHOT

04 Mar 21:38
Compare
Choose a tag to compare

0.30.0

04 Feb 07:28
Compare
Choose a tag to compare

Added

  • dot-spacing (#293),
    annotation (#303) rules.

Fixed

  • Missing newline before ")" (#327).

Changed

  • kotlin-compiler version to 1.3.20 (from 1.2.71) (#331).

Security

  • --ruleset/--reporter switched to HTTPS (#332).

0.29.0

02 Oct 19:12
Compare
Choose a tag to compare

Fixed

  • no-semi rule to preserve semicolon after companion object; (see #281 for details).
  • "line number off by one" when end_of_line=CRLF is used (#286).

Changed

  • package-name rule not to check file location (until #280 can be properly addressed).
  • comment-spacing rule not to flag //region & //endregion comments (#278).
  • kotlin-compiler version to 1.2.71 (from 1.2.51).

0.28.0

05 Sep 21:56
Compare
Choose a tag to compare

Fixed

  • ktlint hanging in case of unhandled exception in a reporter (#277).

Changed

  • package-name rule (directories containing . in their names are no longer considered to be invalid) (#276).

0.27.0

06 Aug 18:11
Compare
Choose a tag to compare

Changed

  • ktlint output (report location is now printed only if there are style violations) (#267).

0.26.0

30 Jul 22:58
Compare
Choose a tag to compare

Changed

  • max-line-length rule (multi-line strings are no longer checked) (#262).

0.25.1

25 Jul 20:47
Compare
Choose a tag to compare

Fixed

  • json reporter \ and control characters escaping (#256).