Releases: pinterest/ktlint
Releases · pinterest/ktlint
0.42.1
[0.42.1] - 2021-08-06
Dot release to fix regressions in indent
rule introduced in 0.42.0 release. Thanks to t-kameyama for the fixes!
Fixed
0.42.0
Thank you to the following contributors for this release:
Added
- SARIF output support (#1102)
Fixed
- Remove needless blank lines in dot qualified expression (#1077)
- Fix false positives for SpacingBetweenDeclarationsWithAnnotationsRule (#1125)
- Fix false positive with eol comment (
annotation-spacing
) (#1124) - Fix KtLint dependency variant selection (#1114)
- Fix false positive with 'by lazy {}' (
indent
) (#1162) - Fix false positive with value argument list has lambda (
indent
) (#764) - Fix false positive in lambda in dot qualified expression (
argument-list-wrapping
) (#1112) - Fix false positive with multiline expression with elvis operator in assignment (
indent
) (#1165) - Ignore backticks in imports for ordering purposes (
import-ordering
) (#1106) - Fix false positive with elvis operator and comment (
chain-wrapping
) (#1055) - Fix false negative in when conditions (
chain-wrapping
) (#1130) - Fix the Html reporter Chinese garbled (#1140)
- Performance regression introduced in 0.41.0 (#1135)
Changed
- Updated to dokka 1.4.32 (#1148)
- Updated Kotlin to 1.5.20 version
0.41.0
[0.41.0] - 2021-03-16
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 formax-line-length
rule to ignore long method names inside backticks
(primarily used in tests) (#1007) - Allow to add/replace loaded
.editorconfig
values viaExperimentalParams#editorConfigOverride
(#1016) ReporterProvider
,LintError
,RuleSetProvider
now implementSerializable
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 useij_kotlin_imports_layout
to ensure
that the Kotlin IDE plugin and ktlint use same imports layout (#753) - Deprecated
idea
andascii
shortcuts as theij_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.
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
0.39.0
Added
- Add new applyToIDEA location for IDEA 2020.1.x and above on MacOs
- Debug output: print loaded .editorconfig content
- Extract
argument-list-wrapping
rule into experimental ruleset - Split
annotation-spacing
into separate experimental rule
Fixed
- Do not enforce raw strings opening quote to be on a separate line (#711)
- False negative with multiline type parameter list in function signature for
parameter-list-wrapping
(#680) - Alternative
.editorconfig
path is ignored on stdin input (#869) - False positive with semicolons before annotations/comments/kdoc (#825)
- Do not report when string-template expression is a keyword (#883)
- False positive for subclass imports in
no-unused-imports
(#845) - False positive for static java function imports in
no-unused-imports
(#872) - Missing signature for KtLint CLI artifact published to Github release (#895)
- Crash in annotation rule (#868)
- False-positive unused import violation (#902)
Changed
Ktlint
object internal code cleanup- Deprecate some of public methods in
Ktlint
object that should not be exposed as public api - Update Kotlin to 1.4.10 version
- Make
RuleSet
class open so it can be inherited
0.38.1
0.38.0
New release with Kotlin 1.4.0 support and several enhancements and bugfixes.
Added
- Experimental SpacingAroundAngleBracketsRule (#769)
- Checksum generation for executable Jar (#695)
- Enable Gradle dependency verification
parameter-list-wrapping
rule now also considers function arguments while wrapping (#620)- Publish snapshots built against kotlin development versions
- Initial support for tab-based indentation (#128)
Fixed
- Safe-called wrapped trailing lambdas indented correctly (#776)
provideDelegate
imports are not marked as unused anymore (#669)- Set continuation indent to 4 in IDE integration codestyle (#775)
- No empty lines between annotation and annotated target (#688)
- Unused imports reported correctly (#526) (#405)
- No false empty lines inserted in multiline if-else block (#793)
- No-wildcard-imports properly handles custom infix function with asterisk (#799)
- Do not require else to be in the same line of a right brace if the right brace is not part of the if statement (#756)
- Brace-less if-else bodies starting with parens indented correctly (#829)
- If-condition with multiline call expression inside indented correctly (#796)
Changed
- Update Gradle to 6.6 version
- Update ec4j to 0.2.2 version. Now it should report path to
.editorconfig
file on failed parsing
and allow empty.editorconfig
files. - Update Kotlin to 1.4.0 version (#830)
0.38.0 Alpha 1
Alpha release built against Kotlin 1.4.