fix(checkpatch): detect issues in commit message

The current implementation of make checkpatch does not detect issues
when Signed-off-by line is missing. The solution is to concatenate
the output of both git log and git diff before executing checkpatch
script.

Change-Id: Ic2d6f8bc10316d73b72a73a1807aa36cdec6900d
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
This commit is contained in:
Yann Gautier 2024-08-09 11:52:03 +02:00 committed by Yann Gautier
parent 92fead00f9
commit 1a72174860

View file

@ -1634,11 +1634,10 @@ checkpatch: locate-checkpatch
for commit in `git rev-list --no-merges $$COMMON_COMMIT..HEAD`; \
do \
printf "\n[*] Checking style of '$$commit'\n\n"; \
git log --format=email "$$commit~..$$commit" \
-- ${CHECK_PATHS} | \
${CHECKPATCH} ${CHECKPATCH_OPTS} - || true; \
( git log --format=email "$$commit~..$$commit" \
-- ${CHECK_PATHS} ; \
git diff --format=email "$$commit~..$$commit" \
-- ${CHECK_PATHS} | \
-- ${CHECK_PATHS}; ) | \
${CHECKPATCH} ${CHECKPATCH_OPTS} - || true; \
done