This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 865356908de doc: Contributing tools/checkpatch.sh example update.
865356908de is described below
commit 865356908de85be89265c052bcdee65cc4be795d
Author: Tomasz 'CeDeROM' CEDRO <[email protected]>
AuthorDate: Sat Apr 18 05:41:47 2026 +0200
doc: Contributing tools/checkpatch.sh example update.
* Add `./tools/checkpatch.sh -c -u -m -g HEAD~...HEAD` example
to match checks performed by our CI.
* Add cross-reference to checkpatch.sh documentation.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <[email protected]>
---
Documentation/components/tools/checkpatch.rst | 2 ++
Documentation/contributing/coding_style.rst | 19 ++++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Documentation/components/tools/checkpatch.rst
b/Documentation/components/tools/checkpatch.rst
index 4f907bfac89..586c0c239af 100644
--- a/Documentation/components/tools/checkpatch.rst
+++ b/Documentation/components/tools/checkpatch.rst
@@ -1,3 +1,5 @@
+.. _checkpatch.sh:
+
=================
``checkpatch.sh``
=================
diff --git a/Documentation/contributing/coding_style.rst
b/Documentation/contributing/coding_style.rst
index 67016afe6e2..7d38dc16e2c 100644
--- a/Documentation/contributing/coding_style.rst
+++ b/Documentation/contributing/coding_style.rst
@@ -8,28 +8,29 @@ C Coding Standard
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
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 checkpatch.sh script
-(that calls the `nxstyle <#nxstyle>`_ tool) included under ``tools/`` in the
-main NuttX repository, or enable the pre-commit functionality described in
-`pre-commit <#precommit>`__.
+for conformance to the coding style, you should use the :ref:`checkpatch.sh`
+script (that calls the `nxstyle <#nxstyle>`_ tool) included under ``tools/``
+in the 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:
+Please verify formatting of your git commits before a Pull Request is
+submitted/updated. Use :ref:`checkpatch.sh` script that will verify the coding
+style, encoding, and spelling issues:
.. code-block:: bash
- ./tools/checkpatch.sh -g HEAD~...HEAD
+ ./tools/checkpatch.sh -c -u -m -g HEAD~...HEAD
Alternatevily you can run this script passing the .c file or .h header you
-want to check:
+want to check using ``-f`` switch:
.. code-block:: bash
- ./tools/checkpatch.sh -f path/to/your/file.c
+ ./tools/checkpatch.sh -c -u -m -f path/to/your/file.c
*******************
General Conventions