From b6dd2273dcd8e1e8e1f6eb0c0306b3ba20a8427b Mon Sep 17 00:00:00 2001 From: theohax Date: Wed, 29 Sep 2021 18:16:15 +0300 Subject: [PATCH] Address code review #2 --- ci/impl/clang-format.sh | 12 +++++------- ci/impl/cmake-format.sh | 14 +++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ci/impl/clang-format.sh b/ci/impl/clang-format.sh index c61a2b7a6d..3a3d69626e 100644 --- a/ci/impl/clang-format.sh +++ b/ci/impl/clang-format.sh @@ -77,14 +77,12 @@ _clang_format_perform() return 2 fi - find "$ROOTPATH/nano" \( -iname "*.h" \ - -o \ - -iname "*.hpp" \ - -o \ - -iname "*.cpp" \ - \) \ + find "$ROOTPATH/nano" -type f \( -iname "*.hpp" \ + -o \ + -iname "*.cpp" \ + \) \ -print0 | - while read -d $'\0' file + while read -d $'\0' file do if [[ $1 == "do" ]]; then "$CLANG_FORMAT" -i "$file" diff --git a/ci/impl/cmake-format.sh b/ci/impl/cmake-format.sh index d687b108e3..9a8c187319 100644 --- a/ci/impl/cmake-format.sh +++ b/ci/impl/cmake-format.sh @@ -76,14 +76,14 @@ _cmake_format_perform() return 2 fi - find "$ROOTPATH" \( -iwholename "$ROOTPATH/CMakeLists.txt" \ - -o \ - -iwholename "$ROOTPATH/coverage/CMakeLists.txt" \ - -o \ - -iwholename "$ROOTPATH/nano/*/CMakeLists.txt" \ - \) \ + find "$ROOTPATH" -type f \( -iwholename "$ROOTPATH/CMakeLists.txt" \ + -o \ + -iwholename "$ROOTPATH/coverage/CMakeLists.txt" \ + -o \ + -iwholename "$ROOTPATH/nano/*/CMakeLists.txt" \ + \) \ -print0 | - while read -d $'\0' file + while read -d $'\0' file do if [[ $1 == "do" ]]; then "$CMAKE_FORMAT" -i "$file"