This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a27655a5a6 checkpatch.sh:Fix checking for wrong cmake files
a27655a5a6 is described below

commit a27655a5a639fca881f0d52e171b56d3a71e48c6
Author: xuxin19 <[email protected]>
AuthorDate: Wed Oct 9 11:47:07 2024 +0800

    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 <[email protected]>
---
 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

Reply via email to