From fc4c4315638df9d4e44567e6197828637a1ae4cf Mon Sep 17 00:00:00 2001 From: Lukas Woodtli Date: Fri, 9 Feb 2024 12:41:59 +0100 Subject: [PATCH] ci: Exclude tests and `tinydtls` from `scan-build` We don't want to check the third-party code of `tinydtls`. Checking the tests gives a lot of complaints about macros of `CUint` that are not defined in the context of `scan-build`. --- tools/ci/run_ci.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/ci/run_ci.sh b/tools/ci/run_ci.sh index 56be772f4..1ed86b490 100755 --- a/tools/ci/run_ci.sh +++ b/tools/ci/run_ci.sh @@ -372,8 +372,13 @@ if [ -n "${OPT_TEST_COVERAGE_REPORT}" ]; then fi if [ -n "${OPT_SCAN_BUILD}" ]; then + # Excluding tests as `scan-build` does not know macros of + # `CUnit` which leads to a lot of noisy issues in the report. + # Also ignoring third-party `tinydtls` library. OPT_WRAPPER_CMD="${OPT_SCAN_BUILD} \ - -o build-wakaama/clang-static-analyzer" + -o build-wakaama/clang-static-analyzer \ + --exclude tests \ + --exclude examples/shared/tinydtls" fi # Run Steps