mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
DOC: Fix documentation to include checkpatch.sh
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
Unfortunately new contributors used to submit code with many coding issues. And in fact it is our guilt: our codign style documentation doesn't say to them how to use the checkpatch to find the issues. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
committed by
Mateusz Szafoni
parent
3594f9d879
commit
edba1b5701
@@ -8,9 +8,28 @@ C Coding Standard
|
|||||||
NuttX follows a specific coding style which needs to be followed at all times
|
NuttX follows a specific coding style which needs to be followed at all times
|
||||||
a contribution to be accepted. Please read this document before working on
|
a contribution to be accepted. Please read this document before working on
|
||||||
new code so that you can follow the style from the start. To check your code
|
new code so that you can follow the style from the start. To check your code
|
||||||
for conformance to the coding style, you should use the `nxstyle <#nxstyle>`_
|
for conformance to the coding style, you should use the checkpatch.sh script
|
||||||
tool included under ``tools/`` in the main NuttX repository, or enable the
|
(that calls the `nxstyle <#nxstyle>`_ tool) included under ``tools/`` in the
|
||||||
pre-commit functionality described in `pre-commit <#precommit>`__.
|
main NuttX repository, or enable the pre-commit functionality described in
|
||||||
|
`pre-commit <#precommit>`__.
|
||||||
|
|
||||||
|
**************************
|
||||||
|
Quick Check for Compliance
|
||||||
|
**************************
|
||||||
|
|
||||||
|
You should check for coding style issues before submitting your Pull Request.
|
||||||
|
There is a script that you can run to check for coding styles issue:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
./tools/checkpatch.sh -g HEAD~...HEAD
|
||||||
|
|
||||||
|
Alternatevily you can run this script passing the .c file or .h header you
|
||||||
|
want to check:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
./tools/checkpatch.sh -f path/to/your/file.c
|
||||||
|
|
||||||
*******************
|
*******************
|
||||||
General Conventions
|
General Conventions
|
||||||
|
|||||||
Reference in New Issue
Block a user