From ed93d628630368608c4e93c30047a8bd960f3ba0 Mon Sep 17 00:00:00 2001 From: Alexander Krimm Date: Thu, 19 Sep 2024 10:09:07 +0200 Subject: [PATCH] Coverage: configure Sonarcube exclusions Fix sonarcube configuration to correctly exclude everything that is not run by the CI and therefore cannot have any coverage data. Also exclude a bunch of auxiliary files that are part of the build system or generic helper tools. --- sonar-project.properties | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 0fd56205e..9d5b1af80 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -13,8 +13,9 @@ sonar.cfamily.cpp23.enabled=true #sonar.sourceEncoding=UTF-8 sonar.coverageReportPaths=../build/coverage.xml -sonar.test=. +sonar.tests=. # note: only add benchmarks starting with bm_ to be able to exclude bm-nosonar_ files -sonar.exclusions=**/third_party/**/*,**/test/**/*,**/benchmarks/* -sonar.test.inclusions=**/test/**/*,**/benchmarks/bm_* +sonar.exclusions=**/third_party/**/*,**/test/**/* +sonar.coverage.exclusions=devtools/**/*,docs/**/*,cmake/**,docker/**/*,patches/**/*,core/src/main.cpp,**/**_example.cpp,**/bm_test_helper.hpp +sonar.test.inclusions=**/test/**/*,**/benchmarks/bm_*,bench/bm_*, sonar.cfamily.compile-commands=../build/compile_commands.json