Closed dbartolini closed 2 years ago
With Uncrustify_d-0.74.0-338-50025791 the spacing between else if and { is wrong.
Uncrustify_d-0.74.0-338-50025791
else if
{
Command (debug.txt):
./build/uncrustify -p debug.txt -c elseif.cfg -f elseif.cpp
Input:
if (false) { } else if (false) { }
Output:
Expected output:
If you remove nl_brace_else = remove from config uncrustify produces expected output. If you disable this code block uncrustify produces expected output.
nl_brace_else = remove
I didn't investigate further.
you need to use the option
# Add or remove space between ')' and '{' of control statements. sp_sparen_brace = force
It does the trick. Thanks.
With
Uncrustify_d-0.74.0-338-50025791
the spacing betweenelse if
and{
is wrong.Command (debug.txt):
Input:
Output:
Expected output:
If you remove
nl_brace_else = remove
from config uncrustify produces expected output. If you disable this code block uncrustify produces expected output.I didn't investigate further.