Исправлена работа анализатора clazy
This commit is contained in:
parent
d1685694ed
commit
6449929719
@ -18,7 +18,7 @@ function(add_clazy_check target)
|
|||||||
|
|
||||||
cmake_parse_arguments(_CLAZY "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(_CLAZY "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
set(_sources ${ARGN})
|
set(_sources ${_CLAZY_UNPARSED_ARGUMENTS})
|
||||||
if(NOT _CLAZY_CHECKS)
|
if(NOT _CLAZY_CHECKS)
|
||||||
set(_CLAZY_CHECKS "level2,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,isempty-vs-count,qt-keywords,unneeded-cast")
|
set(_CLAZY_CHECKS "level2,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,isempty-vs-count,qt-keywords,unneeded-cast")
|
||||||
endif()
|
endif()
|
||||||
@ -38,68 +38,6 @@ function(add_clazy_check target)
|
|||||||
endif()
|
endif()
|
||||||
add_dependencies(clazy-check-${target} ${target})
|
add_dependencies(clazy-check-${target} ${target})
|
||||||
add_dependencies(clazy-check clazy-check-${target})
|
add_dependencies(clazy-check clazy-check-${target})
|
||||||
|
|
||||||
# option(CMLIB_CLAZY_FIX_QT_KEYWORDS "Fix Qt keywords" OFF)
|
|
||||||
# option(CMLIB_CLAZY_FIX_RANGE_LOOP_ADD_REF "Fix range loop add reference" OFF)
|
|
||||||
# option(CMLIB_CLAZY_FIX_RANGE_LOOP_ADD_QASCONST "Fix range loop add qAsConst" OFF)
|
|
||||||
# option(CMLIB_CLAZY_FIX_FUNCTION_ARGS_BY_REF "Fix function args by reference" OFF)
|
|
||||||
# option(CMLIB_CLAZY_FIX_OLD_STYLE_CONNECT "Fix old style connect" OFF)
|
|
||||||
# option(CMLIB_CLAZY_FIX_STRING_ALLOCATIONS "Fix string allocations" OFF)
|
|
||||||
#
|
|
||||||
# if(CMLIB_CLAZY_FIX_QT_KEYWORDS OR
|
|
||||||
# CMLIB_CLAZY_FIX_RANGE_LOOP_ADD_REF OR
|
|
||||||
# CMLIB_CLAZY_FIX_RANGE_LOOP_ADD_QASCONST OR
|
|
||||||
# CMLIB_CLAZY_FIX_FUNCTION_ARGS_BY_REF OR
|
|
||||||
# CMLIB_CLAZY_FIX_OLD_STYLE_CONNECT OR
|
|
||||||
# CMLIB_CLAZY_FIX_STRING_ALLOCATIONS)
|
|
||||||
# if(NOT TARGET clazy-fix)
|
|
||||||
# add_custom_target(clazy-fix)
|
|
||||||
# endif()
|
|
||||||
# if(CMLIB_CLAZY_FIX_QT_KEYWORDS)
|
|
||||||
# add_custom_target(clazy-fix-qt-keywords-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -E env "CLAZY_FIXIT=fix-qt-keywords"
|
|
||||||
# ${CLAZY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
|
||||||
# add_dependencies(clazy-fix-qt-keywords-${target} ${target})
|
|
||||||
# add_dependencies(clazy-fix clazy-fix-qt-keywords-${target})
|
|
||||||
# endif()
|
|
||||||
# if(CMLIB_CLAZY_FIX_RANGE_LOOP_ADD_REF)
|
|
||||||
# add_custom_target(clazy-fix-range-loop-add-ref-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -E env "CLAZY_FIXIT=fix-range-loop-add-ref"
|
|
||||||
# ${CLAZY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
|
||||||
# add_dependencies(clazy-fix-range-loop-add-ref-${target} ${target})
|
|
||||||
# add_dependencies(clazy-fix clazy-fix-range-loop-add-ref-${target})
|
|
||||||
# endif()
|
|
||||||
# if(CMLIB_CLAZY_FIX_RANGE_LOOP_ADD_QASCONST)
|
|
||||||
# add_custom_target(clazy-fix-range-loop-add-qasconst-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -E env "CLAZY_FIXIT=fix-range-loop-add-qasconst"
|
|
||||||
# ${CLAZY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
|
||||||
# add_dependencies(clazy-fix-range-loop-add-qasconst-${target} ${target})
|
|
||||||
# add_dependencies(clazy-fix clazy-fix-range-loop-add-qasconst-${target})
|
|
||||||
# endif()
|
|
||||||
# if(CMLIB_CLAZY_FIX_FUNCTION_ARGS_BY_REF)
|
|
||||||
# add_custom_target(clazy-fix-function-args-by-ref-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -E env "CLAZY_FIXIT=fix-function-args-by-ref"
|
|
||||||
# ${CLAZY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
|
||||||
# add_dependencies(clazy-fix-function-args-by-ref-${target} ${target})
|
|
||||||
# add_dependencies(clazy-fix clazy-fix-function-args-by-ref-${target})
|
|
||||||
# endif()
|
|
||||||
# if(CMLIB_CLAZY_FIX_OLD_STYLE_CONNECT)
|
|
||||||
# add_custom_target(clazy-fix-old-style-connect-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -E env "CLAZY_FIXIT=fix-old-style-connect"
|
|
||||||
# ${CLAZY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
|
||||||
# add_dependencies(clazy-fix-old-style-connect-${target} ${target})
|
|
||||||
# add_dependencies(clazy-fix clazy-fix-old-style-connect-${target})
|
|
||||||
# endif()
|
|
||||||
# # "fix-qlatin1string-allocations", "qstring-allocations");
|
|
||||||
# # "fix-fromLatin1_fromUtf8-allocations", "qstring-allocations");
|
|
||||||
# # "fix-fromCharPtrAllocations", "qstring-allocations");
|
|
||||||
# if(CMLIB_CLAZY_FIX_STRING_ALLOCATIONS)
|
|
||||||
# add_custom_target(clazy-fix-string-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -E env "CLAZY_FIXIT=fix-qlatin1string-allocations"
|
|
||||||
# ${CLAZY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
|
||||||
# add_dependencies(clazy-fix-string-${target} ${target})
|
|
||||||
# add_dependencies(clazy-fix clazy-fix-string-${target})
|
|
||||||
# endif()
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "CMLIB warning:")
|
message(STATUS "CMLIB warning:")
|
||||||
|
Loading…
Reference in New Issue
Block a user