From 842b0c54d4abd808d67f03c5273911c3892e3a5a Mon Sep 17 00:00:00 2001 From: liuhaitao Date: Tue, 10 Mar 2020 11:55:22 +0800 Subject: [PATCH] checkpatch: add checkpatch.sh README and correct some typos Change-Id: Ib917dae235dc42fa2fa29e40c925f8fd048131df Signed-off-by: liuhaitao --- 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 465e114e7f..52d51e0657 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 (default) + -g + -f + - 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 45303dd238..b6731f5dd0 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 (default)" echo "-g " echo "-f "