From 8a5e0f6933a4d91bd00bd2362c2494a829f14f6b Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Wed, 14 Dec 2022 00:17:02 -0700 Subject: [PATCH] Fix bug where clang-tidy CI job always passes --- cmake/Tidy.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/Tidy.cmake b/cmake/Tidy.cmake index b65a82e61..2b1e6aa07 100644 --- a/cmake/Tidy.cmake +++ b/cmake/Tidy.cmake @@ -20,4 +20,7 @@ else() endif() # Run -execute_process(COMMAND run-clang-tidy -clang-tidy-binary ${CLANG_TIDY_EXECUTABLE} -p ${PROJECT_BINARY_DIR}) +execute_process(COMMAND run-clang-tidy -clang-tidy-binary ${CLANG_TIDY_EXECUTABLE} -p ${PROJECT_BINARY_DIR} RESULTS_VARIABLE EXIT_CODE) +if(NOT EXIT_CODE STREQUAL 0) + message(FATAL_ERROR "Analysis failed") +endif()