ktlint v0.31.0 Release Notes

Release Date: 2019-04-16 // about 5 years ago
  • โž• 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.pinterest.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: <node.psi::class> () "" 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](https://github.com/shyiko/ktlint/issues/349)).