home  

nl_case_colon_brace

Properties

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

Description

Add or remove newline between a case ':' and '{'.

Overrides nl_after_case.

Examples

raw CPP code nl_case_colon_brace=ignore nl_case_colon_brace=add nl_case_colon_brace=remove nl_case_colon_brace=force nl
nl_case_colon_brace=force
void f(){switch(a){case 1:a++;break;case -1:a--;case 123:a--;break;default:a=0;}} void f(){ switch(a){case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0;} } void f(){ switch(a){case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0;} } void f(){ switch(a){case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0;} } void f(){ switch(a){case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0;} } void f(){ switch(a){case 1: a++;break;case -1: a--;case 123: a--;break;default: a=0;} }
 

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