Commit 02a76d5f authored by Yann Gautier's avatar Yann Gautier
Browse files

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: default avatarYann Gautier <yann.gautier@st.com>
parent d4abda29
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment