From 2075216728d7c248be0a9f6ca3964ea1fc478226 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Tue, 11 Nov 2025 19:29:56 +0100 Subject: [PATCH] add cppcheck analyse after tests --- tests/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.47.3