From 5e7f4db25d00b3ae37d9302e4dbc46b83ef5a591 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Thu, 28 May 2020 15:35:52 +0200 Subject: [PATCH] Remove extra grep logs when running clang-tidy Signed-off-by: Laurent Bonnans --- scripts/clang-tidy-wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/clang-tidy-wrapper.sh b/scripts/clang-tidy-wrapper.sh index e61209ebdf..425a3d0a34 100755 --- a/scripts/clang-tidy-wrapper.sh +++ b/scripts/clang-tidy-wrapper.sh @@ -14,7 +14,7 @@ fi # Filter out anything that we aren't trying to compile. Older clang-tidy # versions (<=6) skipped them automatically. -if grep "${FILE}" "${CMAKE_BINARY_DIR}/compile_commands.json"; then +if grep -q "${FILE}" "${CMAKE_BINARY_DIR}/compile_commands.json"; then ${CLANG_TIDY} -quiet -header-filter="\(${CMAKE_SOURCE_DIR}|\\.\\.\)/src/.*" --extra-arg-before=-Wno-unknown-warning-option -format-style=file -p "${CMAKE_BINARY_DIR}" "${FILE}" else echo "Skipping ${FILE}"