2

Somehow I don't like one line if statements like

if (looks_ugly) please_break_this();

and want to turn them into this

if (looks_ugly)
        please_break_this();

Can astyle do that for me? I can't find an appropriate option to astyle.

Igor S.K.
  • 999
  • 6
  • 17

1 Answers1

1

this will work

astyle -J | astyle -xj

i.e., first add one line brackets, then remove them. The final output will be formatted automatically.