[coreboot] Proposing a change to Coding Style

Vadim Bendebury vbendeb at chromium.org
Wed May 16 18:45:25 CEST 2018


Speaking of coding style: there is no pre-upload check configured in the
coreboot git repo, if I am not mistaken, should one be added?

As for this particular change - I don't like wasting vertical space, but
looks like overwhelming sentiment is supporting this proposal, so I sure
can live with it, especially if there is a pre-upload check to enforce it.

-vb


On Wed, May 16, 2018 at 8:16 AM Patrick Georgi via coreboot <
coreboot at coreboot.org> wrote:

> Hi everybody,
>
> after just running into an issue on the EC code base, I hereby propose that
> going forward, we should always wrap conditional blocks in braces, even
> one-liners.
> That is:
>
> if (foo) {
>    bar();
> }
>
> instead of
>
> if (foo)
>    bar();
>
> It doesn't hurt too much but saves us from accidentally adding baz() after
> bar(), forgetting to add the - now required - braces. If we get rough
> consensus over this, I'd change Coding_Style to match.
>
>
> Thoughts?
> Patrick
> --
> Google Germany GmbH, ABC-Str. 19, 20354 Hamburg
> Registergericht und -nummer: Hamburg, HRB 86891, Sitz der Gesellschaft:
> Hamburg
> Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
>
> --
> coreboot mailing list: coreboot at coreboot.org
> https://mail.coreboot.org/mailman/listinfo/coreboot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180516/f1eff9a9/attachment.html>


More information about the coreboot mailing list