← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Implement auto annotation on component/symbol placement.


On 2019-10-15 11:57, Moses McKnight wrote:
On 10/15/19 1:41 PM, Seth Hillbrand wrote:
4) Single-line statements after if/else don't get brackets {}

Is that actually part of the kicad code standard?!?  Every standard
and recommendation I've ever seen recommends/requires the opposite to
prevent future errors (see for instance:


I should have expounded a bit more. Braces are optional[1]. They should be used to help to clarify code, intent or structure. In the patch submitted, braces were not consistently used for single-line statements. The ones that were used were not needed and added extra vertical space making reading the small function more difficult. This was the root of comment (4)


Seth Hillbrand
KiCad Services Corporation
+1 530 302 5483 | +1 212 603 9372

[1] https://kicad-source-mirror.readthedocs.io/en/stable/Documentation/development/coding-style-policy/#47-braces-braces