我想知道是否有任何方法可以使用 Uncrustify 在嵌套的 If-else 中添加大括号。例如:
if( stat_error == -1 ){
if ( debug > 0 )
printf( "...ERROR ); //I would like to add braces around here.
exit( -1 );
} else {
我见过这个:
# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
mod_full_brace_if = add # ignore/add/remove/force
但它似乎不适用于嵌套条件。
有什么办法吗?