In https://github.com/apache/incubator-nuttx-apps/pull/179, there is a
removed graphics/littlevgl/lv_symbol_def.patch file whose content would be
treated abnormally and results in errors.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Make 'checkpatch.sh -c commits' and 'checkpatch.sh -p patches' do full
file check as default, while 'checkpatch.sh -r -c commits' and 'checkpatch.sh
-r -p patches' do ranges check only.
* tools/nxstyle.c: Donot check unknown file extension files
nxstyle only support c soure file and header file check, donot check
other unknown file extension files.
* tools/checkpatch.sh: Add checkpatch.sh script based on nxstyle tool
Usage:
checkpatch.sh patch-list // default as patch list
checkpatch.sh -p patch-list
checkpatch.sh -c commit-list
checkpatch.sh -f file-list
checkpatch.sh - // read from stdin, which used by git pre-commit hook
And git pre-commit hook could use checkpatch.sh as below:
git diff --cached | ./tools/checkpatch.sh -