You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/03/10 10:13:10 UTC
[incubator-nuttx] branch master updated: checkpatch: add
checkpatch.sh README and correct some typos
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 842b0c5 checkpatch: add checkpatch.sh README and correct some typos
842b0c5 is described below
commit 842b0c54d4abd808d67f03c5273911c3892e3a5a
Author: liuhaitao <li...@xiaomi.com>
AuthorDate: Tue Mar 10 11:55:22 2020 +0800
checkpatch: add checkpatch.sh README and correct some typos
Change-Id: Ib917dae235dc42fa2fa29e40c925f8fd048131df
Signed-off-by: liuhaitao <li...@xiaomi.com>
---
tools/README.txt | 19 +++++++++++++++++++
tools/checkpatch.sh | 4 ++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/tools/README.txt b/tools/README.txt
index 465e114..52d51e0 100644
--- a/tools/README.txt
+++ b/tools/README.txt
@@ -26,6 +26,25 @@ Config.mk
Subsequent logic within the configuration-specific Make.defs file may then
override these default definitions as necessary.
+checkpatch.sh
+-------------
+ checkpatch.sh is a bash script that make use of nxstyle and codespell tools
+ to format patches and files conform to NuttX coding standard. For example,
+ it has been used in NuttX github action PR check build.
+
+ $ tools/checkpatch.sh -h
+ USAGE: ./tools/checkpatch.sh [options] [list|-]
+
+ Options:
+ -h
+ -c spell check with codespell(install with: pip install codespell)
+ -r range check only (coupled with -p or -g)
+ -p <patch list> (default)
+ -g <commit list>
+ -f <file list>
+ - read standard input mainly used by git pre-commit hook as below:
+ git diff --cached | ./tools/checkpatch.sh -
+
configure.sh
configure.bat
configure.c, cfgparser.c, and cfgparser.h
diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 45303dd..b6731f5 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -27,8 +27,8 @@ usage() {
echo ""
echo "Options:"
echo "-h"
- echo "-c spell check with codespell(install with: pip install codespell"
- echo "-r range check only (used with -p and -g)"
+ echo "-c spell check with codespell(install with: pip install codespell)"
+ echo "-r range check only (coupled with -p or -g)"
echo "-p <patch list> (default)"
echo "-g <commit list>"
echo "-f <file list>"