extension_builder icon indicating copy to clipboard operation
extension_builder copied to clipboard

Keep new line after "case" statement

Open taalas opened this issue 7 years ago • 2 comments

Currently the parser will rewrite case statements that look like this:

case '1':
    something();
    break;

to

case '1':    something();
    break;

Is this intended? Keeping a new line after the case statement would improve readability alot imho.

taalas avatar May 04 '18 05:05 taalas

No it is not intended. The code is anytime completely rewritten by the parser & printer. There are some cases where the printer does not behave as wanted (for example line breaks in array definitions etc.) but it is quite hard to implement custom rules...

nicodh avatar May 04 '18 06:05 nicodh

Have a look at \EBT\ExtensionBuilder\Service\Printer if you want to experiment with customizing the printer behaviour...

nicodh avatar May 04 '18 06:05 nicodh