ols icon indicating copy to clipboard operation
ols copied to clipboard

odinfmt: "Allman" brace style inserts extra new lines in switch

Open VladGdev opened this issue 4 months ago • 0 comments

So far this issue specifically happens with switch statements, after every format command issued, the odinfmt adds an extra line before the curly bracket opens until it reaches maximum of 3 new lines and then stops.

Expected behavior of "Allman" brace style:

num := 1

switch num
{
        case 0:
        case 1:
}

Current behavior:

num := 1

switch num


 
{
        case 0:
        case 1:
}

VladGdev avatar Oct 19 '24 09:10 VladGdev