[libc++] Fix the check-format job
authorLouis Dionne <ldionne.2@gmail.com>
Wed, 21 Jun 2023 13:08:45 +0000 (09:08 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Wed, 21 Jun 2023 21:59:32 +0000 (17:59 -0400)
Previously, it wouldn't take into account files in ignore_format.txt
(at least not on OSX) because the `find` command would return file names
like `libcxx/src//new_handler.cpp`, which never matched the file names
in `ignore_format.txt`.

Differential Revision: https://reviews.llvm.org/D153416

libcxx/utils/ci/run-buildbot

index cd8a7e3..0dffe7e 100755 (executable)
@@ -198,7 +198,7 @@ check-format)
     ${GIT_CLANG_FORMAT} \
         --diff \
         --extensions ',h,hpp,c,cpp,cppm,inc,ipp' HEAD~1 \
-        -- $(find libcxx/{benchmarks,include,modules,src}/ -type f | grep -vf libcxx/utils/data/ignore_format.txt) \
+        -- $(find libcxx/{benchmarks,include,modules,src} -type f | grep -vf libcxx/utils/data/ignore_format.txt) \
         | tee ${BUILD_DIR}/clang-format.patch
     # Check if the diff is empty, fail otherwise.
     ! grep -q '^--- a' ${BUILD_DIR}/clang-format.patch