-
Notifications
You must be signed in to change notification settings - Fork 278
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
FormatOps: check for left brace in multistat block #3279
Conversation
def notOK: Boolean = | ||
if (1 == 1) { c; a + b }.foo | ||
else | ||
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def notOK: Boolean = | |
if (1 == 1) { c; a + b }.foo | |
else | |
false | |
def notOK: Boolean = | |
if (1 == 1) { c; a + b }.foo | |
else false |
why only fold thenp ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else
part uses the existing newline. and the then
part uses an old rule about {
. i will copy the same tests into scala2, they are formatted exactly the same.
i will try to address that rule separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes it starts a smaller region and shouldn't be skipped.
Depending on how scalameta parses the code, the left brace could be just before the multistat block (previously covered) or at the head of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM then!
Depending on how scalameta parses the code, the left brace could be just before the multistat block (previously covered) or at the head of it. Fixes #3276.