home  

nl_before_if_closing_paren

Properties

  Category: Newline adding and removing options
      Type: multiple (ignore add remove force)
   Default: ignore

Description

Add or remove newline before 'if'/'else if' closing parenthesis.

Examples

raw CPP code nl_before_if_closing_paren=ignore nl_before_if_closing_paren=add nl_before_if_closing_paren=remove nl_before_if_closing_paren=force nl
nl_before_if_closing_paren=force
void fnl1(){if(a)b();else c();} void fnl2(){if(a){b();}else{c();}} void fnl1(){ if(a) b(); else c(); } void fnl2(){ if(a){b();}else{c();} } void fnl1(){ if(a ) b(); else c(); } void fnl2(){ if(a ){b();}else{c();} } void fnl1(){ if(a) b(); else c(); } void fnl2(){ if(a){b();}else{c();} } void fnl1(){ if(a ) b(); else c(); } void fnl2(){ if(a ){b();}else{c();} } void fnl1(){ if(a ) b();elsec(); } void fnl2(){ if(a ){b();}else{c();} }
 

Not the best code for this option? See how to improve the .uds file used to generate these examples.