Hello,
Our code coverage measurement a suddenly dropped to 0% for all our C++ projects.
Something happened on last Monday 26th between 17h20 (GMT+2) and 17h53. The day after, I received an email explaining me our subscription had been updated to SonarQube Cloud Team on the 26th.
The reason why I think it is related is because all our 4 GitLab runners (on Windows) have been impacted at the same time without touching anything on our CI regarding this aspect.
The issue we face is with the C++ code coverage evaluation from bullseye
XML output. More specifically, the regex given to sonar.test.inclusions
seems to behave differently now and to ignore all our source code rather than some specific files.
Here is our config:
sonar.sources=code
sonar.exclusions=code/tools/**/*
sonar.tests=code
sonar.test.inclusions=code/**/test/**/*,code/tests/**/*
Before the update, we had the following output in our logs:
INFO: ------------- Run sensors on project
INFO: Sensor bullseye [cpp]
INFO: Parsing C:\buildroot\projectname\sonar\coverage_report.xml
WARN: File not analysed by Sonar, so ignoring coverage: c:\buildroot\projectname\code\..\build\Debug\CMakeFiles\3.29.6\CompilerIdC\CMakeCCompilerId.c
WARN: File not analysed by Sonar, so ignoring coverage: c:\buildroot\projectname\code\..\build\Debug\CMakeFiles\3.29.6\CompilerIdCXX\CMakeCXXCompilerId.cpp
WARN: File not analysed by Sonar, so ignoring coverage: c:\buildroot\projectname\code\..\build\Debug\CMakeFiles\ShowIncludes\main.c
[...]
WARN: File not analysed by Sonar, so ignoring coverage: c:\buildroot\projectname\code\..\ext\submodule_project\code\libname\src\SomeFile.cpp
[...]
Now we have the same output, but with more lines (our source code that is now ignored in the coverage):
WARN: File not analysed by Sonar, so ignoring coverage: c:\buildroot\projectname\code\libname\src\units\UnitName\AccuracyCheckUnitFile.cpp
[...]
Any idea how to fix this?
Thanks.