Community
Participate
Working Groups
When a statement has a nested statement which spans multiple lines we want to keep the braces at the "complex" levels, i.e. only remove simple caes. // remove braces if (a) B; // Add braces if (a) { try { } } // Add braces at outer level, remove at inner if (a) { if (b) c } If a statement's nested statements cover multiple lines (short of wrapped lines) it should have braces. One could add a depth parameter to get. if (a) if (b) c but if (a) { if (b) if (c) d } Yet another option could be to consider comments when counting lines if (a) { // c b } or if (a) // c Default should be to count comment lines and add braces.
Thanks for raising this. However, it might be a while before we can even look at it.