Skip to content

0.31.0

Compare
Choose a tag to compare
@shyiko shyiko released this 11 Mar 06:41
· 1780 commits to master since this release

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