-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter wrapping incompatible with ktlint with long function parameter #245
Comments
Similar issue: Original (and ktlint's version, and my personal preference): typealias Listener = (
aVeryLongFoo: String,
anotherVeryLongFoo: String,
aThirdVeryLongFoo: String,
aFourthVerylongFoo: String
) -> Unit ktfmt's version (google-style, FWIW): typealias Listener =
(
aVeryLongFoo: String,
anotherVeryLongFoo: String,
aThirdVeryLongFoo: String,
aFourthVerylongFoo: String) -> Unit |
bethcutler
added a commit
to bethcutler/ktfmt
that referenced
this issue
Apr 7, 2022
This was referenced Apr 7, 2022
facebook-github-bot
pushed a commit
that referenced
this issue
Apr 13, 2022
Fixed by 1bebf0b, closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current ktfmt formatting:
What ktlint expects:
I think the ktlint formatting looks better. The ) on a new line would be standard for "google-style". The ( not being on its own line is a bit more compact and it's more obvious what the parens are "attached" to. However, the current style is similar to the version with a scoping function, e.g.: (Acceptable for both ktfmt and ktlint)
The text was updated successfully, but these errors were encountered: