From 23c6095ebfe3123aa531d708801a2288a94ed57c Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Fri, 9 Feb 2018 17:52:43 -0800 Subject: [PATCH] doc: update CONTRIBUTING guidelines Commit messages now require a body summary (before it could be blank for "trivial" changes). Add mention of uncrustify to help format code to project standards. Signed-off-by: David B. Kinder --- CONTRIBUTING.rst | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 6e91225a5ee..f823eed9bde 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -250,6 +250,26 @@ various samples with advanced features that can't run in QEMU. We highly recommend you run these tests locally to avoid any CI failures. +uncrustify +========== + +The `uncrustify tool `_ can +be helpful to quickly reformat your source code to our `project coding +standards `_ together with a configuration file we've provided: + +.. code-block:: bash + + uncrustify --replace --no-backup -l C -c + $ZEPHYR_BASE/scripts/uncrustify.cfg my_source_file.c + +On Linux systems, you can install uncrustify with + +.. code-block:: bash + + sudo apt install uncrustify + +For Windows installation instructions see the `sourceforge listing for +uncrustify `_. Coding Style ************ @@ -450,9 +470,11 @@ Commit Message Body =================== When editing the commit message, please briefly explain what your change -does and why it's needed. A change summary of ``"Fixes stuff"`` will be rejected. An -empty change summary is only acceptable for trivial changes fully described by -the commit title (e.g., ``doc: fix misspellings in CONTRIBUTING doc``) +does and why it's needed. A change summary of ``"Fixes stuff"`` will be rejected. + +.. warning:: + An empty change summary body is not permitted. Even for trivial changes, please + include a summary body in the commmit message. The description body of the commit message must include: