-
Notifications
You must be signed in to change notification settings - Fork 230
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
Wrapping of long function signatures #725
Comments
Synced to Apple’s issue tracker as rdar://126967203 |
IIRC, the reason for this was that we wanted to allow tuple return values to break after the open paren, like: func foo(someArgument: Int, andAnother: Int, andYetAnother: Int) -> (
element: SomeType,
element2: SomeOtherType
) {} So we never grouped around the return type at all. We should probably use more knowledge of the return type's node kind here to determine whether we want to wrap it in a group or not.
This was the original behavior, which someone else at Apple (I think, it was years ago) argued was too aggressive. 🙂 It can be enabled by setting |
Oh, I didn’t know about |
Enabling |
Formatting this to 80 columns
Which is definitely not the most intuitive way of formatting it. I would have expected
In a less extreme case, I would also expect the following to wrap the argument list instead of the return type
The text was updated successfully, but these errors were encountered: