From 1a721748605bc753089bc34c6010aa236c9d0ab7 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Fri, 9 Aug 2024 11:52:03 +0200 Subject: [PATCH] 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 --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index baf8431f6..b44084753 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --format=email "$$commit~..$$commit" \ - -- ${CHECK_PATHS} | \ + ( git log --format=email "$$commit~..$$commit" \ + -- ${CHECK_PATHS} ; \ + git diff --format=email "$$commit~..$$commit" \ + -- ${CHECK_PATHS}; ) | \ ${CHECKPATCH} ${CHECKPATCH_OPTS} - || true; \ done