Skip to content
Permalink
Browse files

doc: coding style: Expand the list of keywords with braces

Zephyr requires braces on every code block that a keyword introduces, so
list the complete set in the documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
  • Loading branch information...
carlescufi authored and galak committed May 15, 2019
1 parent f9efca4 commit bedfcf4d1bd1956599b2e87ad2296e62e730e429
Showing with 3 additions and 3 deletions.
  1. +3 −3 doc/contribute/index.rst
@@ -323,9 +323,9 @@ project's style and naming conventions.
In general, follow the `Linux kernel coding style`_, with the
following exceptions:

* Add braces to every ``if`` and ``else`` body, even for single-line code
blocks. Use the ``--ignore BRACES`` flag to make *checkpatch* stop
complaining.
* Add braces to every ``if``, ``else``, ``do``, ``while``, ``for`` and
``switch`` body, even for single-line code blocks. Use the ``--ignore BRACES``
flag to make *checkpatch* stop complaining.
* Use spaces instead of tabs to align comments after declarations, as needed.
* Use C89-style single line comments, ``/* */``. The C99-style single line
comment, ``//``, is not allowed.

0 comments on commit bedfcf4

Please sign in to comment.
You can’t perform that action at this time.