← Back to team overview

kicad-developers team mailing list archive

Re: Uncrustify case indentation rules

 

Hi

2015-01-08 0:40 GMT+01:00 John Beard <john.j.beard@xxxxxxxxx>:
> Hi,
>
> Is the policy for braced case indentation as follows?

Policy is found in
http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/view/head:/Documentation/coding_style_policy.pdf

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

As far as I can see the should be the syntax.  Braces on the level of
the keyword and content of the block indented.  See 4.9 Switch
Formatting.

> 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.

Ohh great, I did not test it, but I guess that looks right.

> Thanks,
>
> John
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References