Closed djlindstr closed 5 years ago
Actually, let me re-phrase the issue somewhat since it's not just about the missing braces. The following examples are also mis-indented. Expected indentation:
if (x) { foo() }
else if (y) { bar() }
else if (z) { baz() }
else { s = 1 }
if (x) { foo() }
else { if (y) bar() }
else { if (z) baz() }
else { s = 1 }
In groovy-mode the else:s are currently indented one extra level each. I will hopefully be able to fix these as well.
The Groovy documentation contains this example:
The nested if-else chain is indented too much in groovy-mode. The below snippet is another shorter test case.
Currently indented
I am working on a fix for these cases.