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 "->"
whenwhen
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