We are using the following setup, which is getting updated soon:
- SonarQube Server - Developer Edition v2025.2 (105476)
- build-wrapper-linux-x86-64 v6.65 - from our sonarqube instance
- SonarScanner CLI 7.2.0.5079
- C and Gcov for analysis
We have a monorepo with several possible builds, each in a separate SonarQube project. There is one generic sonar-project.properties file and we want to avoid manually maintaining one for each target.
According to the documentation (and my understanding of it
), we can rely on the build wrapper output to analyze only what is included in our build.
Any file that doesn’t end up in a compiled compilation unit will not be analyzed. As a consequence, source files that are not compiled and header files that are not included in any compiled source file will not be analyzed.
from Prerequisites | SonarQube Server 2025.2 | Sonar Documentation
However, some files that aren’t in the build wrapper output will show up in the code coverage analysis, most likely since they have a gcov output file due to having or being used in unit tests for other targets.
Does this mean that “compiled compilation unit” isn’t limited to the output from the build-wrapper, but also includes any gcov output?
Is there a setting that will exclude gcov output in this case?
I went through the monorepo documentation in Enterprise edition and couldn’t see something that would work around this issue.
I also went through the release notes from v2025.2 to v2026.3, but couldn’t find anything relevant, so our server version shouldn’t matter, correct?