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.56
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.57
Choose a head ref
  • 17 commits
  • 43 files changed
  • 3 contributors

Commits on Jun 26, 2025

  1. Bump version to 0.57-SNAPSHOT

    Summary: Version bump to 0.57-SNAPSHOT
    
    Reviewed By: cortinico
    
    Differential Revision: D77304039
    
    fbshipit-source-id: 7a0ebad038de0a5084b08170569452f11a4b7415
    Nivaldo Bondança authored and facebook-github-bot committed Jun 26, 2025
    Configuration menu
    Copy the full SHA
    b0ce097 View commit details
    Browse the repository at this point in the history
  2. Removed mvn build

    Summary: Now that we have successfully validated the gradle publish flow (both 0.55 and 0.56 were published with it), we can retire the mvn build files.
    
    Reviewed By: cortinico
    
    Differential Revision: D77373562
    
    fbshipit-source-id: 86fd896e6715924c18c168a0cc7dc19aa0d83300
    Nivaldo Bondança authored and facebook-github-bot committed Jun 26, 2025
    Configuration menu
    Copy the full SHA
    81277c3 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2025

  1. xplat/ktfmt/core/src/main/java/com/facebook/ktfmt/format/KotlinInputA…

    …stVisitor.kt
    
    Reviewed By: drhill-meta
    
    Differential Revision: D78883775
    
    fbshipit-source-id: 0325db5032811ce26b0c14c8c18a9541dae1dab1
    generatedunixname537391475639613 authored and facebook-github-bot committed Jul 24, 2025
    Configuration menu
    Copy the full SHA
    5e06669 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2025

  1. Adjusted fat jar reference in website

    Summary: We changed the name starting on v0.55, the classifier went from `jar-with-dependencies` to `with-dependencies`, but we forgot to update things here. Fixed now!
    
    Differential Revision: D79772885
    
    fbshipit-source-id: 735034daa07b3e50c964eb979b4dd8110b7a4ffd
    Nivaldo Bondança authored and facebook-github-bot committed Aug 7, 2025
    Configuration menu
    Copy the full SHA
    cedc196 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2025

  1. Create TrailingCommaManagementStrategy which allows option for only a…

    …ddition of trailing commas
    
    Summary:
    This makes it possible to fix the issues:
    - #461
    - #512
    - #514
    
    Differential Revision: D79772883
    
    fbshipit-source-id: 19edf3eefe1daa2fb6b378db7a5aee3dcdfe308e
    Nivaldo Bondança authored and facebook-github-bot committed Aug 11, 2025
    Configuration menu
    Copy the full SHA
    f767ee8 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2025

  1. Trailing comma strategy support for IJ plugin + minor issues

    Summary:
    Added support for all trailing comma strategies to the IJ plugin.
    
    Also fixing the following errors and warnings:
    ```
    e: KtfmtConfigurable.kt:178:42 Cannot access 'val manageTrailingCommas: Boolean': it is internal in 'com/facebook/ktfmt/format/FormattingOptions'.
    e: KtfmtSettings.kt:134:79 Cannot access 'val manageTrailingCommas: Boolean': it is internal in 'com/facebook/ktfmt/format/FormattingOptions'.
    e: KtfmtSettings.kt:141:54 Cannot access 'val manageTrailingCommas: Boolean': it is internal in 'com/facebook/ktfmt/format/FormattingOptions'.
    
    w: KotlinInputAstVisitor.kt:1440:25 'val leftParenthesis: PsiElement?' is deprecated. Deprecated in Java.
    w: KotlinInputAstVisitor.kt:1444:25 'val rightParenthesis: PsiElement?' is deprecated. Deprecated in Java.
    w: KotlinInputAstVisitor.kt:1950:17 Identity-sensitive operation on an instance of value type 'Optional<String!>!' may cause unexpected behavior or errors.
    w: KotlinInputAstVisitor.kt:1950:40 Identity-sensitive operation on an instance of value type 'Optional<String>' may cause unexpected behavior or errors.
    w: FormatterTest.kt:5492:13 'constructor(maxWidth: Int, blockIndent: Int, continuationIndent: Int, manageTrailingCommas: Boolean = ..., removeUnusedImports: Boolean = ..., debuggingPrintOpsAfterFormatting: Boolean = ...): FormattingOptions' is deprecated. Here just for retrocompatibility reasons. Will be removed on 1.0.0.
    ```
    
    Differential Revision: D80024619
    
    fbshipit-source-id: 86da94918856c6d734fc83208d521ad9697e6fe5
    Nivaldo Bondança authored and facebook-github-bot committed Aug 12, 2025
    Configuration menu
    Copy the full SHA
    cf3fba5 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2025

  1. Trailing commas for Meta style

    Summary: As discussed in [this post](https://fb.workplace.com/groups/ktfmt/posts/2286361675144702)
    
    Differential Revision: D80116948
    
    fbshipit-source-id: 27e244dc7cd8fa23e582f58dc2533048164e5b9b
    Nivaldo Bondança authored and facebook-github-bot committed Aug 13, 2025
    Configuration menu
    Copy the full SHA
    79e985c View commit details
    Browse the repository at this point in the history
  2. Add formatting to where clause

    Summary:
    Fixes issue #541
    
    Code was 90%+ AI generated from the prompt "fix #541".
    I just had to come in to fix a couple of things.
    
    Reviewed By: cortinico
    
    Differential Revision: D80097075
    
    fbshipit-source-id: e63774789f1d53f3d1c5fc5443d6944957f77ade
    Nivaldo Bondança authored and facebook-github-bot committed Aug 13, 2025
    Configuration menu
    Copy the full SHA
    06c1254 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2025

  1. Fix trailing comma in when cases

    Summary:
    Fixes issue #376
    
    Code was 90%+ AI generated from the prompt "fix #376"
    
    Reviewed By: cortinico
    
    Differential Revision: D80205587
    
    fbshipit-source-id: 3a212b17ceccf0dae4ed0ee816a4f844aad5e422
    Nivaldo Bondança authored and facebook-github-bot committed Aug 14, 2025
    Configuration menu
    Copy the full SHA
    0f6ccd3 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2025

  1. Codemod format for trailing commas incoming change [10/n]

    Summary: Adding trailing commas.
    
    Differential Revision: D80174963
    
    fbshipit-source-id: 32c63ebdf5f5d53930aa060a3457be75bcc6d604
    Nivaldo Bondança authored and facebook-github-bot committed Aug 15, 2025
    Configuration menu
    Copy the full SHA
    c974608 View commit details
    Browse the repository at this point in the history
  2. trimMargin and trimIndent formatting

    Summary:
    Just because it's a multiline string it doesn't mean it doesn't have to be properly formatted.
    
    Following the popular opinion from here
    https://fb.workplace.com/groups/ktfmt/posts/2287111725069697
    
    Reviewed By: cortinico
    
    Differential Revision: D79772886
    
    fbshipit-source-id: 77241b451e36b336cf43d1652fca3d6e228c41c8
    Nivaldo Bondança authored and facebook-github-bot committed Aug 15, 2025
    Configuration menu
    Copy the full SHA
    e14d99c View commit details
    Browse the repository at this point in the history
  3. Apply formatting to ktfmt code

    Summary: This is here to showcase the changes from the previous diff in action
    
    Differential Revision: D79772884
    
    fbshipit-source-id: c2200e1e198aa032bb76963dcc68dbfb349f4d7c
    Nivaldo Bondança authored and facebook-github-bot committed Aug 15, 2025
    Configuration menu
    Copy the full SHA
    0a754f8 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2025

  1. Handle special case in trimMargin

    Summary:
    While formatting the codebase I stumbled upon this issue here where the string gets broken as we add an extra `|` like this:
    ```
    """|my string
    """.trimMargin()
    
    // becomes
    
    """
    ||my string
    """
        .trimMargin()
    ```
    
    Here we fix that issue
    
    Reviewed By: cortinico
    
    Differential Revision: D80388090
    
    fbshipit-source-id: d14f2a6214e7169a71100a8a330a2f78d6951e86
    Nivaldo Bondança authored and facebook-github-bot committed Aug 18, 2025
    Configuration menu
    Copy the full SHA
    9029a50 View commit details
    Browse the repository at this point in the history
  2. Do not add margin to multiline expressions in trimMargin

    Summary:
    While formatting the codebase I stumbled upon this issue here where we add `|` inside of expressions in case they are multiline like this:
    ```
    """
    |my math = ${
      "}" + (1 + 2)
        .toString()
    }
    |     string
    |"""
        .trimMargin()
    
    // becomes
    
    """
    |my math = ${
    |      "}" + (1 + 2)
    |        .toString()
    |    }
    |     string
    |"""
        .trimMargin()
    ```
    
    Here we fix that issue but ignoring any strings that contain that abomination
    
    Differential Revision: D80388985
    
    fbshipit-source-id: beeeccdc7d378425ab24ee6343b2e54f964c994b
    Nivaldo Bondança authored and facebook-github-bot committed Aug 18, 2025
    Configuration menu
    Copy the full SHA
    ec1154f View commit details
    Browse the repository at this point in the history
  3. Only use '|' as margin character if it's the first non-space character

    Summary:
    While formatting the codebase I stumbled upon this issue here:
    ```
    """
          ${specBody.lines().map { "|$it" }.joinToString("\n")}
    """
        .trimMargin()
    
    // becomes
    
    """
    |$it" }.joinToString("\n")}
    """
        .trimMargin()
    ```
    
    Here we fix that issue
    
    Differential Revision: D80430949
    
    fbshipit-source-id: 2d61d730c71b8860bd293ef0af3e3d4670e3a2f3
    Nivaldo Bondança authored and facebook-github-bot committed Aug 18, 2025
    Configuration menu
    Copy the full SHA
    9ad5595 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2025

  1. set intellijPlatform projectName to ktfmt_idea_plugin (#554)

    Summary:
    Resolves #553
    
    Pull Request resolved: #554
    
    Reviewed By: hick209
    
    Differential Revision: D80525617
    
    Pulled By: cortinico
    
    fbshipit-source-id: cf2bef77c0cd6741b5f5b89358d752a64fff648f
    mchristiansen authored and facebook-github-bot committed Aug 19, 2025
    Configuration menu
    Copy the full SHA
    52b4118 View commit details
    Browse the repository at this point in the history
  2. Bump version to 0.57

    Summary: Version bump to 0.57
    
    Reviewed By: cortinico
    
    Differential Revision: D80478993
    
    fbshipit-source-id: d23fe2b5eafb004048ea3774eb0cc5808d168b1a
    Nivaldo Bondança authored and facebook-github-bot committed Aug 19, 2025
    Configuration menu
    Copy the full SHA
    55a407f View commit details
    Browse the repository at this point in the history
Loading