ktlint v0.41.0 Release Notes

Release Date: 2021-03-16 // about 3 years ago
  • Note: This release contains breaking changes to globs passed to ktlint via the command line. See (#999) and the README.

    ๐Ÿš€ Thank you to t-kameyama and paul-dingemans for your contributions to this release!

    โž• Added

    • New ktlint_ignore_back_ticked_identifier EditorConfig option for max-line-length rule to ignore long method names inside backticks (primarily used in tests) (#1007)
    • ๐Ÿ‘ Allow to add/replace loaded .editorconfig values via ExperimentalParams#editorConfigOverride (#1016)
    • ๐Ÿ‘• ReporterProvider, LintError, RuleSetProvider now implement Serializable interface

    ๐Ÿ›  Fixed

    • ๐Ÿ‘• Incorrect indentation with multiple interfaces (#1003)
    • ๐Ÿ‘• Empty line before primary constructor is not reported and formatted-out (#1004)
    • ๐Ÿ›  Fix '.editorconfig' generation for "import-ordering" rule (#1011)
    • ๐Ÿ›  Fix "filename" rule will not work when '.editorconfig' file is not found (#997)
    • ๐Ÿ‘• EditorConfig generation for import-ordering (#1011)
    • ๐Ÿ‘• Internal error (no-unused-imports) (#996)
    • ๐Ÿ›  Fix false positive when argument list is after multiline dot-qualified expression (argument-list-wrapping) (#893)
    • ๐Ÿ›  Fix indentation for function types after a newline (indent) (#918)
    • ๐Ÿ‘• Don't remove the equals sign for a default argument (no-line-break-before-assignment) (#1039)
    • ๐Ÿ›  Fix internal error in no-unused-imports (#1040)
    • ๐Ÿ›  Fix false positives when declaration has tail comments (spacing-between-declarations-with-comments) (#1053)
    • ๐Ÿ›  Fix false positive after else keyword (argument-list-wrapping) (#1047)
    • ๐Ÿ›  Fix formatting with comments (colon-spacing) (#1057)
    • ๐Ÿ›  Fix IndexOutOfBoundsException in argument-list-wrapping-rule formatting file with many corrections (#1081)
    • ๐Ÿ›  Fix formatting in arguments (multiline-if-else) (#1079)
    • ๐Ÿ›  Fix experimental:annotation-spacing-rule autocorrection with comments
    • ๐Ÿ‘• Migrate from klob dependency and fix negated globs passed to CLI are no longer worked (#999) Breaking: absolute paths globs will no longer work, check updated README

    ๐Ÿ”„ Changed

    • โšก๏ธ Update Gradle shadow plugin to 6.1.0 version
    • ๐Ÿ‘• Align with Kotlin plugin on how alias pattern is represented for imports layout rule (#753)
    • ๐Ÿ‘• Align with Kotlin plugin on how subpackages are represented (#753)
    • Deprecated custom kotlin_imports_layout EditorConfig property. Please use ij_kotlin_imports_layout to ensure that the Kotlin IDE plugin and ktlint use same imports layout (#753)
    • Deprecated idea and ascii shortcuts as the ij_kotlin_imports_layout property does not support those. Please check README on how to achieve those with patterns (#753)
    • โšก๏ธ Update Gradle to 6.8.3 version
    • โšก๏ธ Update Kotlin to 1.4.31 version. Fixes #1063.