0.40.0
[0.40.0] - 2020-12-04
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) - 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