Exclude more files from checkpatch and checkcodebase
Exclude documentation files from the `make checkcodebase` target (these files were already excluded from checkpatch). Also exclude libfdt files to prepare for import of this library. Change-Id: Iee597ed66494de2b11cf84096f771f1f04472d5b
This commit is contained in:
parent
f0b489c1d2
commit
1a41e8c1e0
21
Makefile
21
Makefile
|
@ -114,12 +114,14 @@ CHECKPATCH_ARGS := --no-tree --no-signoff ${CHECK_IGNORE}
|
||||||
CHECKCODE_ARGS := --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
|
CHECKCODE_ARGS := --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
|
||||||
# Do not check the coding style on imported library files or documentation files
|
# Do not check the coding style on imported library files or documentation files
|
||||||
INC_LIB_DIRS_TO_CHECK := $(sort $(filter-out \
|
INC_LIB_DIRS_TO_CHECK := $(sort $(filter-out \
|
||||||
|
include/lib/libfdt \
|
||||||
include/lib/stdlib, \
|
include/lib/stdlib, \
|
||||||
$(wildcard include/lib/*)))
|
$(wildcard include/lib/*)))
|
||||||
INC_DIRS_TO_CHECK := $(sort $(filter-out \
|
INC_DIRS_TO_CHECK := $(sort $(filter-out \
|
||||||
include/lib, \
|
include/lib, \
|
||||||
$(wildcard include/*)))
|
$(wildcard include/*)))
|
||||||
LIB_DIRS_TO_CHECK := $(sort $(filter-out \
|
LIB_DIRS_TO_CHECK := $(sort $(filter-out \
|
||||||
|
lib/libfdt \
|
||||||
lib/stdlib, \
|
lib/stdlib, \
|
||||||
$(wildcard lib/*)))
|
$(wildcard lib/*)))
|
||||||
ROOT_DIRS_TO_CHECK := $(sort $(filter-out \
|
ROOT_DIRS_TO_CHECK := $(sort $(filter-out \
|
||||||
|
@ -552,11 +554,20 @@ realclean distclean:
|
||||||
|
|
||||||
checkcodebase: locate-checkpatch
|
checkcodebase: locate-checkpatch
|
||||||
@echo " CHECKING STYLE"
|
@echo " CHECKING STYLE"
|
||||||
@if test -d .git ; then \
|
@if test -d .git ; then \
|
||||||
git ls-files | grep -v stdlib | while read GIT_FILE ; do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; done ; \
|
git ls-files | grep -E -v libfdt\|stdlib\|docs\|\.md | \
|
||||||
else \
|
while read GIT_FILE ; \
|
||||||
find . -type f -not -iwholename "*.git*" -not -iwholename "*build*" -not -iwholename "*stdlib*" -exec ${CHECKPATCH} ${CHECKCODE_ARGS} -f {} \; ; \
|
do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; \
|
||||||
fi
|
done ; \
|
||||||
|
else \
|
||||||
|
find . -type f -not -iwholename "*.git*" \
|
||||||
|
-not -iwholename "*build*" \
|
||||||
|
-not -iwholename "*libfdt*" \
|
||||||
|
-not -iwholename "*stdlib*" \
|
||||||
|
-not -iwholename "*docs*" \
|
||||||
|
-not -iwholename "*.md" \
|
||||||
|
-exec ${CHECKPATCH} ${CHECKCODE_ARGS} -f {} \; ; \
|
||||||
|
fi
|
||||||
|
|
||||||
checkpatch: locate-checkpatch
|
checkpatch: locate-checkpatch
|
||||||
@echo " CHECKING STYLE"
|
@echo " CHECKING STYLE"
|
||||||
|
|
Loading…
Reference in New Issue