Skip to content

Releases: facebook/ktfmt

0.42

09 Dec 12:37
Compare
Choose a tag to compare

Changes:

  1. A new kdoc formatting engine! we've integrated https://github.com/tnorbye/kdoc-formatter into ktfmt, which fixes several kdoc formatting bugs.
  2. Preserve indentation of trailing comments in comma-separated lists (#357)

0.41

23 Sep 21:02
Compare
Choose a tag to compare

0.40

02 Sep 15:53
Compare
Choose a tag to compare
  • Don't break before '>' in type arguments
  • Fix some spacing issues with comma separated lists in --google-style (#…
  • Add --stdin-name to specify a file name to use when printing message …
  • Fix crashes on intersection types (e.g. Foo<A & B>) (#341)
  • When there's a break in value arguments, also break in the lambda body
  • Improve lambda indentation when value arguments are on multiple lines
  • When there's a break in type arguments, also break in value arguments
  • Break before '>' in type arguments when they don't fit on one line

0.39

0.38

0.37

0.36

20 Apr 20:27
Compare
Choose a tag to compare

Style change examples:

Before: (notice as)

   bitmapMemoryCacheParamsSupplier =
        builder.bitmapMemoryCacheParamsSupplier
            ?: DefaultBitmapMemoryCacheParamsSupplier(
                (checkNotNull(builder.context.getSystemService(Context.ACTIVITY_SERVICE)) as
                    ActivityManager))

After:

    bitmapMemoryCacheParamsSupplier =
        builder.bitmapMemoryCacheParamsSupplier
            ?: DefaultBitmapMemoryCacheParamsSupplier(
                (checkNotNull(builder.context.getSystemService(Context.ACTIVITY_SERVICE))
                    as ActivityManager))

Before: (notice imports)

    importCleanUpCandidates =
        importList
            .imports
            .filter { import ->
              import.isValidImport &&
                  !import.isAllUnder &&
                  import.identifier != null &&
                  requireNotNull(import.identifier) !in OPERATORS &&
                  !COMPONENT_OPERATOR_REGEX.matches(import.identifier.orEmpty())
            }
            .toSet()

After:

    importCleanUpCandidates =
        importList.imports
            .filter { import ->
              import.isValidImport &&
                  !import.isAllUnder &&
                  import.identifier != null &&
                  requireNotNull(import.identifier) !in OPERATORS &&
                  !COMPONENT_OPERATOR_REGEX.matches(import.identifier.orEmpty())
            }
            .toSet()

Changelist:

0.36a

24 Apr 19:46
Compare
Choose a tag to compare

(this release is only created to trigger the publishing of artifacts)

0.35

0.34

10 Mar 11:44
Compare
Choose a tag to compare