-
Notifications
You must be signed in to change notification settings - Fork 233
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
Add rule to separate case from return statement #493
Comments
Are you using a configuration that disables |
Using a configuration disabling existing line breaks |
Then yes, this is working as intended; the single statement in the If this is desired behavior, we'd have to add a new configuration option to require a line break after a I don't think I'd want to specialize // Today, if it fits
if x { foo() }
// With some new option
if x {
foo()
} |
I’ve been evaluating swift-format the last few days and the eagerness to fit as much as possible on single lines is a bit hard to swallow, while the option to respect existing breaks is too respectful. :) This PR seemed promising until I saw the date. Is there any current work being done in this area? |
Tracked in Apple’s issue tracker as rdar://126948359 |
Currently swift-format would squash case and return statement together like this:
Ideally it should be able to produce something more readable but I don't see any option to achieve that.
The text was updated successfully, but these errors were encountered: