From 7b1fbed3f53cd2ea8b7524cb8261a1b3b6c0d0aa Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Wed, 22 Oct 2025 17:40:58 +0200 Subject: [PATCH] add check dep cppcheck --- builder/Containerfile-forky | 1 + builder/Containerfile-trixie | 1 + tests/CMakeLists.txt | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/builder/Containerfile-forky b/builder/Containerfile-forky index ba48d46..df9f6ab 100644 --- a/builder/Containerfile-forky +++ b/builder/Containerfile-forky @@ -11,6 +11,7 @@ libconfuse-dev \ libcurl4-gnutls-dev \ libjson-c-dev \ libcmocka-dev \ +cppcheck \ lcov \ && apt-get clean COPY run /app/run diff --git a/builder/Containerfile-trixie b/builder/Containerfile-trixie index f096f4e..2ddcd32 100644 --- a/builder/Containerfile-trixie +++ b/builder/Containerfile-trixie @@ -11,6 +11,7 @@ libconfuse-dev \ libcurl4-gnutls-dev \ libjson-c-dev \ libcmocka-dev \ +cppcheck \ lcov \ && apt-get clean COPY run /app/run diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3b86e3a..861de06 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,8 +1,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1) FIND_PACKAGE(CMOCKA REQUIRED) +FIND_PROGRAM(CPPCHECK cppcheck REQUIRED) MESSAGE(STATUS "find ${CMOCKA_LIBRARY}") +MESSAGE(STATUS "find ${CPPCHECK}") ADD_EXECUTABLE("kds_s2000w_net_get_opt_tests" "kds_s2000w_net_get_opt_tests.c" @@ -86,7 +88,7 @@ ADD_CUSTOM_TARGET("runningtests" "kds_s2000w_pixel_converter_tests") ADD_CUSTOM_TARGET("cppcheck" - ALL cppcheck --check-level=exhaustive + ALL ${CPPCHECK} --check-level=exhaustive --enable=warning,style --inline-suppr --error-exitcode=1 -- 2.47.3