← Back to team overview

kicad-developers team mailing list archive

Uncrustify case indentation rules

 

Hi,

Is the policy for braced case indentation as follows?

case SOMETHING:
{
    int i = 0;
    break;
}

This seems to be the case for tidying-up commits like r5288, but the
uncrustify.cfg rules call for:

case SOMETHING:
    {
        int i = 0;
        break;
    }

If this is in fact incorrect, please find attached a patch for
uncrustify.cfg.

Thanks,

John

diff --git a/uncrustify.cfg b/uncrustify.cfg
index 3d52d45..8d5d47b 100644
--- a/uncrustify.cfg
+++ b/uncrustify.cfg
@@ -169,7 +169,7 @@ indent_case_shift                         = 0        # number
 # Spaces to indent '{' from 'case'.
 # By default, the brace will appear under the 'c' in case.
 # Usually set to 0 or indent_columns.
-indent_case_brace                         = 4        # number
+indent_case_brace                         = 0        # number
 
 # Whether to indent comments found in first column
 indent_col1_comment                       = false    # false/true


Follow ups