mirror of
https://github.com/apache/nuttx.git
synced 2026-05-16 22:21:04 +08:00
53fdfa68b9
All of the tools listed on the original documentation are now given their own individual doc pages. This makes it much easier to cross-reference them from other documentation locations (as many are used in CI/for specific architectures) and it also makes it easier for users to digest the information. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
30 lines
1.1 KiB
ReStructuredText
30 lines
1.1 KiB
ReStructuredText
=================
|
|
``checkpatch.sh``
|
|
=================
|
|
|
|
``checkpatch.sh`` is a bash script that makes use of ``nxstyle`` and
|
|
``codespell`` tools to format patches and ensure that files conform to NuttX
|
|
coding standard. It is used in NuttX's GitHub CI.
|
|
|
|
Help message:
|
|
|
|
.. code:: console
|
|
|
|
$ tools/checkpatch.sh -h
|
|
USAGE: tools/checkpatch.sh [options] [list|-]
|
|
|
|
Options:
|
|
-h
|
|
-c spell check with codespell (install with: pip install codespell)
|
|
-u encoding check with cvt2utf (install with: pip install cvt2utf)
|
|
-r range check only (coupled with -p or -g)
|
|
-p <patch file names> (default)
|
|
-m Check commit message (coupled with -g)
|
|
-g <commit list>
|
|
-f <file list>
|
|
-x format supported files (only .py, requires: pip install black)
|
|
- read standard input mainly used by git pre-commit hook as below:
|
|
git diff --cached | ./tools/checkpatch.sh -
|
|
Where a <commit list> is any syntax supported by git for specifying git revision, see GITREVISIONS(7)
|
|
Where a <patch file names> is a space separated list of patch file names or wildcard. or *.patch
|