Skip to content

Releases: facebook/ktfmt

0.34

10 Mar 11:44
Compare
Choose a tag to compare

0.33

25 Feb 19:48
Compare
Choose a tag to compare

Formatting changes

Crash fixes

0.32

10 Feb 09:26
Compare
Choose a tag to compare

0.31

03 Feb 15:28
Compare
Choose a tag to compare

Formatting changes

  • Improve argument indentation when a multi-line function is followed by a lambda.

Before:

someFunction(
    first = arg1,
    second = arg2)
    .also { print(it) }

After:

someFunction(
        first = arg1,
        second = arg2)
    .also { print(it) }
  • Put function invocations on the same line when the variable name is shorter or equal to the indentation size
    • This is not new, but is now done more uniformly.

Before:

user
    .modify()
    .commit()

After:

user.modify()
    .commit()

Crash fixes

Library changes

Library usage before:

import com.facebook.ktfmt.format.format

val formattedCode = format(options, code)

Library usage after:

import com.facebook.ktfmt.format.Formatter

val formattedCode = Formatter.format(options, code)

0.30

17 Nov 20:01
Compare
Choose a tag to compare
  • Support running under Kotlin 1.6 (though some language features may be unsupported or not supported well)

0.29

07 Oct 06:24
Compare
Choose a tag to compare
  • Added dry run mode (#212)

0.28

24 Aug 08:40
Compare
Choose a tag to compare

Major changes

  • Put some delegate expressions in a block.

Before:

val importantValue: Int
    by doIt(1 + 1)

After:

val importantValue: Int by
    doIt(1 + 1)

Fixes

  • Solution for ktfmt not processing .kts files (fixes #224)
  • Fix perpetual addition of newline under certain rare circumstances

0.27

28 Jun 20:57
Compare
Choose a tag to compare

Changes:

  • Roll back "Update ktfmt to fix odd formatting with DSLs. (#214)" to fix #243 .

Get it at https://search.maven.org/artifact/com.facebook/ktfmt/0.27/jar

0.26 (known bad)

21 Jun 19:36
Compare
Choose a tag to compare

UPDATE: This version has a severe bug


Changes:

  • Fix explicit ctor formatting; and KDoc's ``` followed by more text (#238)
  • Update ktfmt to fix odd formatting with DSLs. (#214)
  • Fix for crash when formatting multiple annotations without field: prefix

Artifacts are available at Maven Central: https://search.maven.org/artifact/com.facebook/ktfmt/0.26/jar

0.25

07 May 07:25
Compare
Choose a tag to compare

ktfmt now uses Kotlin Compiler 1.5.0, though it doesn't necessarily handle all new language features.

Artifacts will be shortly available at Maven Central: https://search.maven.org/artifact/com.facebook/ktfmt/0.25/jar