From a27655a5a639fca881f0d52e171b56d3a71e48c6 Mon Sep 17 00:00:00 2001 From: xuxin19 Date: Wed, 9 Oct 2024 11:47:07 +0800 Subject: [PATCH] checkpatch.sh:Fix checking for wrong cmake files patches ending with cmake should be checked. Currently, any non-cmake files containing cmake keywords will be checked. Signed-off-by: xuxin19 --- tools/checkpatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh index db3c48d5a9..98cdcb7ffd 100755 --- a/tools/checkpatch.sh +++ b/tools/checkpatch.sh @@ -63,7 +63,7 @@ is_rust_file() { is_cmake_file() { file_name=$(basename $@) - if [ "$file_name" == "CMakeLists.txt" ] || [[ "$file_name" =~ "cmake" ]]; then + if [ "$file_name" == "CMakeLists.txt" ] || [[ "$file_name" =~ \.cmake$ ]]; then echo 1 else echo 0