Skip to content

Commit

Permalink
Increase the amount of Clang tidy checks that also run for example co…
Browse files Browse the repository at this point in the history
…de (and avoid duplication of the list of checks).
  • Loading branch information
poletti-marco committed Mar 31, 2020
1 parent ffc697d commit b8945ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Expand Up @@ -101,13 +101,15 @@ else()
set(FRUIT_COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} ${FRUIT_ADDITIONAL_COMPILE_FLAGS}")
endif()

set(FRUIT_CLANG_TIDY_CHECKS
bugprone*,-bugprone-reserved-identifier,-bugprone-exception-escape,clang-analyzer*,performance*,google*,-google-readability*,-google-runtime-references,clang-diagnostic-unused-command-line-argument,misc-macro-parentheses,-clang-diagnostic-dtor-name)

set(FRUIT_ENABLE_CLANG_TIDY FALSE CACHE BOOL "Whether to run clang-tidy on the Fruit codebase during the build")
if(${FRUIT_ENABLE_CLANG_TIDY})
set(CMAKE_CXX_CLANG_TIDY
clang-tidy;
-header-filter=fruit;
-checks=bugprone*,-bugprone-reserved-identifier,-bugprone-exception-escape,clang-analyzer*,performance*,google*,-google-readability*,-google-runtime-references,clang-diagnostic-unused-command-line-argument,misc-macro-parentheses,-clang-diagnostic-dtor-name;
-checks=${FRUIT_CLANG_TIDY_CHECKS};
-warnings-as-errors=*;)
endif()

Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Expand Up @@ -4,7 +4,7 @@ if(${FRUIT_ENABLE_CLANG_TIDY})
set(CMAKE_CXX_CLANG_TIDY
clang-tidy;
-header-filter=fruit;
-checks=bugprone*,clang-analyzer*,-bugprone-reserved-identifier,-bugprone-exception-escape,-clang-diagnostic-dtor-name;
-checks=${FRUIT_CLANG_TIDY_CHECKS},-google-explicit-constructor,-google-build-using-namespace;
-warnings-as-errors=*;)
endif()

Expand Down

0 comments on commit b8945ef

Please sign in to comment.