Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/ktfmt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.58
Choose a base ref
...
head repository: facebook/ktfmt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.59
Choose a head ref
  • 6 commits
  • 9 files changed
  • 2 contributors

Commits on Aug 28, 2025

  1. Bump version to 0.59-SNAPSHOT

    Summary: Version bump to 0.59-SNAPSHOT
    
    Reviewed By: cortinico
    
    Differential Revision: D81230136
    
    fbshipit-source-id: bec2251f1f4bbfd51ea052b2d4173ea041141863
    Nivaldo Bondança authored and facebook-github-bot committed Aug 28, 2025
    Configuration menu
    Copy the full SHA
    f4e36ef View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2025

  1. Do not remove semicolon after an unnamed empty companion object, if i…

    …t isn't the last element
    
    Summary: This conservative - in many cases it's ok to remove the semicolon, but it's hard to detect this comprehensibly in ktfmt.
    
    Reviewed By: hick209, cortinico
    
    Differential Revision: D81409950
    
    fbshipit-source-id: fd6df0a501dc19c0e0045b652a63ebf28a9f6599
    cgrushko authored and facebook-github-bot committed Sep 2, 2025
    Configuration menu
    Copy the full SHA
    dee261b View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2025

  1. Do not to add extra line on the beginning

    Summary:
    Fixed a couple of issues + restructured the code to make it more maintainable. Adding more tests to it as well, which were the result of the work to make it more modular.
    
    Issues fixed:
    1. Fixed issue where formatter would remove nested multiline triple quotes
    2. Do not to add extra line on the beginning
    
    ## Issue 1 : formatter removes nested multiline triple quotes
    Before, blocks such as this
    ```
    """
    ${
      """
      hello
      """
          .trimIndent()
    }
    """
        .trimIndent()
    ```
    Would be turned into this here, which breaks compilation
    ```
    """
    ${
      """
      hello
          .trimIndent()
    }
    """
        .trimIndent()
    ```
    
    This is an unacceptable bug! This here fixes it, but I've also disabled formatting of nested trim indent since formatting template expressions is not something we do in ktfmt at the moment.
    
    ## Issue 2 : Do not to add extra line on the beginning
    I've validated and this is what Kotlin does using the following code
    ```
    print("<output>")
    print("""${"    "}
        hello
        world
        """.trimIndent())
    println("</output>")
    
    println("---")
    
    print("<output>")
    print("""${"    "}
        hello
        world
        """.trimMargin())
    println("</output>")
    ```
    Results in
    ```
    <output>hello
    world</output>
     ---
    <output>    hello
        world</output>
    ```
    
    Therefore here I make sure we don't include the extra line at the begining as we currently do.
    
    Differential Revision: D81396128
    
    fbshipit-source-id: 388a0e7b1869c377be86481a135a6615f62438b7
    Nivaldo Bondança authored and facebook-github-bot committed Sep 8, 2025
    Configuration menu
    Copy the full SHA
    c50cf8b View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2025

  1. Do not clear up blank lines that are not in the edges of the string

    Summary:
    Blank lines are only trimmed when they are at the first or last line of the string in the `trim` methods.
    
    We don't want to udpate the content of the strings here, therefore let's make sure to replicate the Kotlin behavior here.
    
    Differential Revision: D82537118
    
    fbshipit-source-id: e8a6b213e118b212a11232b98352c4019411ea6e
    Nivaldo Bondança authored and facebook-github-bot committed Sep 16, 2025
    Configuration menu
    Copy the full SHA
    24bd2f8 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2025

  1. Update ktfmt component on FBS:master

    Summary:
    X-link: facebookexternal/meta-ar-mr-tooling#200
    
    X-link: facebook/react-native#53956
    
    Reviewed By: jselbo
    
    Differential Revision: D82570814
    
    fbshipit-source-id: 6eeade55734548d057c5eae77a9188172473a819
    Nivaldo Bondança authored and facebook-github-bot committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    3809b93 View commit details
    Browse the repository at this point in the history
  2. Bump version to 0.59

    Summary: Version bump to 0.59
    
    Reviewed By: cortinico
    
    Differential Revision: D83262334
    
    fbshipit-source-id: 4e9fa020d54bb0e8c172ae4d74a9b76af47b7adb
    Nivaldo Bondança authored and facebook-github-bot committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    e83c7c9 View commit details
    Browse the repository at this point in the history
Loading