Подключения дополнительных проверок Clazy

This commit is contained in:
Andrei Astafev 2019-10-16 19:18:32 +03:00
parent aa267e4bfc
commit cd3afd21c8

View File

@ -1,3 +1,5 @@
set(clazy_checks container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,isempty-vs-count,qt-keywords,unneeded-cast)
function(add_clazy_check) function(add_clazy_check)
list(GET ARGN 0 _target) list(GET ARGN 0 _target)
set(_sources ${ARGN}) set(_sources ${ARGN})
@ -11,7 +13,7 @@ function(add_clazy_check)
add_custom_target(clazy-check-${_target} add_custom_target(clazy-check-${_target}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${CLAZY_EXE} COMMAND ${CLAZY_EXE}
-checks=level2 -checks=level2,${clazy_checks}
-extra-arg="-Wno-unknown-warning-option" -extra-arg="-Wno-unknown-warning-option"
-p -p
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}