Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Format parameters in lambda #1976

Closed
paul-dingemans opened this issue Apr 24, 2023 · 1 comment · Fixed by #1997
Closed

Format parameters in lambda #1976

paul-dingemans opened this issue Apr 24, 2023 · 1 comment · Fixed by #1997
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

After updating to 0.49.0 this is still not working as ktlint expects the formatting to look like this:

fun combine(a: Any, b: Any, c: (Any, Any) -> Unit) {
  c(a, b)
}

class Foo {
  fun foo() {
    combine(
      Any(),
      Any()
    ) { a,
              b -> // Unexpected indentation (8) (should be 14) (standard:indent)
      TODO()
    }
  }
}

Originally posted by @eygraber in #1756 (comment)

@paul-dingemans
Copy link
Collaborator Author

In 0.49.0 it works correctly for code style ktlint_official. With the other code styles the formatting is indeed incorrect.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant