summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2019-03-08 15:44:00 +0100
committerYann Gautier <yann.gautier@st.com>2019-03-11 10:09:53 +0100
commit02a76d5ff25a287489ae652b5ebfe0e96b504a67 (patch)
treea01ffcb67309f2d8b8e7026b5453779d02fad411 /Makefile
parentd4abda29fbc66739955573e439d59248cf356788 (diff)
Add the possibility to pass options for checkpatch
It can be handy for example to add --strict option which can detect more coding issues, even if not mandated by TF-A coding rules. To use it: CHECKPATCH_OPTS="--strict" make checkpatch Change-Id: I707e4cc2d1250b21f18ff16169b5f1e5ab03a7ed Signed-off-by: Yann Gautier <yann.gautier@st.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6386befd..c6d42106 100644
--- a/Makefile
+++ b/Makefile
@@ -841,13 +841,18 @@ checkcodebase: locate-checkpatch
checkpatch: locate-checkpatch
@echo " CHECKING STYLE"
+ @if test -n "${CHECKPATCH_OPTS}"; then \
+ echo " with ${CHECKPATCH_OPTS} option(s)"; \
+ fi
${Q}COMMON_COMMIT=$$(git merge-base HEAD ${BASE_COMMIT}); \
for commit in `git rev-list $$COMMON_COMMIT..HEAD`; do \
printf "\n[*] Checking style of '$$commit'\n\n"; \
git log --format=email "$$commit~..$$commit" \
- -- ${CHECK_PATHS} | ${CHECKPATCH} - || true; \
+ -- ${CHECK_PATHS} | \
+ ${CHECKPATCH} ${CHECKPATCH_OPTS} - || true; \
git diff --format=email "$$commit~..$$commit" \
- -- ${CHECK_PATHS} | ${CHECKPATCH} - || true; \
+ -- ${CHECK_PATHS} | \
+ ${CHECKPATCH} ${CHECKPATCH_OPTS} - || true; \
done
certtool: ${CRTTOOL}