ktlint v0.40.0 Release Notes

Release Date: 2020-12-04 // over 3 years ago
  • ๐Ÿ›  Special thanks to t-kameyama for the huge number of bugfixes in this release!

    โž• Added

    • ๐ŸŽ‰ Initial implementation IDE integration via '.editorconfig' based on rules default values (#701)
    • ๐Ÿ‘• CLI subcommand generateEditorConfig to generate '.editorconfig' content for Kotlin files (#701)
    • ๐Ÿ‘• A new capability to generate baseline and run ktlint against it with --baseline cli option (#707)

    ๐Ÿ›  Fixed

    • ๐Ÿ‘• Do not report when semicolon is before annotation/comment/kdoc and lambda (#825)
    • ๐Ÿ›  Fix false positive when import directive has backticks and alias (#910)
    • ๐Ÿ‘• @receiver annotations with parameters are not required to be on a separate line (#885)
    • ๐Ÿ›  Fix false positive "File annotations should be separated from file contents with a blank line" in kts files (#914)
    • ๐Ÿ›  Fix false positive Missing newline after "->" when when entry has a nested if/else block (#901)
    • ๐Ÿ‘ Allow an inline block comment in argument-list-wrapping (#926)
    • ๐Ÿ›  Fix false positive for line-breaks inside lambdas in argument-list-wrapping (#861) (#870)
    • ๐Ÿ›  Fix wrong indentation inside an if-condition in argument-list-wrapping (#854) (#864)
    • ๐Ÿ›  Fix false positive for method after string template in argument-list-wrapping (#842) (#859)
    • ๐Ÿ›  Fix false positive when a comment is not between declarations in spacing-between-declarations-with-comments(#865)
    • ๐Ÿ›  Fix formatting with comments (multiline-if-else) (#944)
    • ๐Ÿ‘• Do not insert unnecessary spacings inside multiline if-else condition (indent) (#871) (#900)
    • ๐Ÿ‘• Correctly indent primary constructor parameters when class has multiline type parameter (parameter-list-wrapping) (#921) (#938)
    • ๐Ÿ‘• Correctly indent property delegates (indent) (#939)
    • ๐Ÿ›  Fix false positive for semicolon between empty enum entry and member (no-semicolons) (#957)
    • ๐Ÿ›  Fix wrong indentation for class delegates (indent) (#960) (#963) (#877)
    • ๐Ÿ›  Fix wrong indentation in named arguments (indent) (#964)
    • ๐Ÿ›  Fix wrong indentation when a function has multiline type arguments (parameter-list-wrapping) (#965)
    • ๐Ÿ›  Fix false positive for spacing-between-declarations-with-annotations (#970)
    • ๐Ÿ›  Fix ParseException when an assigment contains comments (no-line-break-before-assignment) (#956)
    • ๐Ÿ›  Fix false positive when right brace is after a try-catch block (spacing-around-keyword) (#978)
    • ๐Ÿ›  Fix false positive for control flow with empty body (no-semicolons) (#955)
    • ๐Ÿ›  Fix incorrect indentation for multi-line call expressions in conditions (indent) (#959)
    • ๐Ÿ›  Fix false positive for trailing comma before right parentheses|bracket|angle (spacing-around-comma) (#975)
    • ๐Ÿ›  Fix ktlint CLI could skip checking some of explicetly passed files (#942)

    ๐Ÿ”„ Changed

    • ๐Ÿ‘• 'import-ordering' now supports `.editorconfig' default value generation (#701)
    • โšก๏ธ Update Gradle to 6.7.1 version