-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Respect new lines between case statements #383
Comments
I'm on board with this idea. I just checked prettier, and they maintain the extra line between cases statements if it exists. |
.assign |
Should the same apply to switch expressions? var newState = (GetState(), action, hasKey) switch
{
// Open/Close
(DoorState.Closed, Action.Open, _) => DoorState.Opened,
(DoorState.Opened, Action.Close, _) => DoorState.Closed,
// Locking
(DoorState.Closed, Action.Lock, true) => DoorState.Locked,
(DoorState.Locked, Action.Unlock, true) => DoorState.Closed,
// Do nothing
(var state, _, _) => state
}; |
pmccloghrylaing
added a commit
to faktored/csharpier
that referenced
this issue
Aug 2, 2021
shocklateboy92
pushed a commit
that referenced
this issue
Aug 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current behaviour removes any new lines between case statements, so it converts:
to:
I think it should maintain an extra space, just like between statements in a block:
The text was updated successfully, but these errors were encountered: