checkpatch: add checkpatch.sh README and correct some typos

Change-Id: Ib917dae235dc42fa2fa29e40c925f8fd048131df
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
liuhaitao 2020-03-10 11:55:22 +08:00 committed by Abdelatif Guettouche
parent 793b0c2040
commit 842b0c54d4
2 changed files with 21 additions and 2 deletions

View File

@ -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

View File

@ -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>"