From fd99385ab79335cf4ae50d9bc86710df38bdb09c Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Fri, 28 Oct 2022 03:06:28 +0000 Subject: [PATCH] scripts: checkpatch: Add file format suffix check Signed-off-by: Joseph Chen Change-Id: I79d090af66c4ed699c9f127f9571e7396ffea679 --- scripts/checkpatch.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/checkpatch.sh b/scripts/checkpatch.sh index 52867c86..99c53982 100755 --- a/scripts/checkpatch.sh +++ b/scripts/checkpatch.sh @@ -69,6 +69,10 @@ function check_doc() fi # check standalone file + if ! echo ${FILE} | grep -Eq '\.bin|\.elf|\.img' ; then + echo "ERROR: ${DOC}: '${FILE}' missing the file format suffix" + exit 1 + fi if ! echo ${FILE} | grep -q { ; then if ! git log ${ARG_COMMIT} -1 --name-only | grep -q ${FILE}; then echo "ERROR: ${DOC}: '${FILE}' is not updated in this patch"