1
0
Fork 0
forked from nuttx/nuttx-update

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 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2024-10-09 11:47:07 +08:00 committed by Xiang Xiao
parent e98d018265
commit a27655a5a6

View file

@ -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