From: Bastian Dehn Date: Tue, 11 Nov 2025 18:29:56 +0000 (+0100) Subject: add cppcheck analyse after tests X-Git-Tag: 1.3.8^2~5 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=2075216728d7c248be0a9f6ca3964ea1fc478226;p=feierabend.git add cppcheck analyse after tests --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5179edc..7342135 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1) FIND_LIBRARY(CMOCKA cmocka REQUIRED) +FIND_PROGRAM(CPPCHECK cppcheck REQUIRED) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/src) @@ -29,4 +30,12 @@ ADD_CUSTOM_TARGET(run_tests COMMAND ./time_format_tests DEPENDS break_tests worktime_tests - time_format_tests) \ No newline at end of file + time_format_tests) + +ADD_CUSTOM_COMMAND(TARGET run_tests + POST_BUILD + COMMAND ${CPPCHECK} + --check-level=exhaustive + --enable=warning,style + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/tests) \ No newline at end of file