For GitHub pull request builds, we generated .gcov files for a CPP project and fed them to our SonarQube server. Then a SonarQube scan report was generated successfully.
Everything looked good except the coverage data report somehow counted the lines not touched in the pull request. This issue happens to us frequently and happens to different lines of different files. The .gcov file contents are correct.
Our observation is that it might be related to GitHub integration in the SonarQube server because previously the data was correct when we forgot to set the integration to api.github.com.
Thanks for helping out. Do you mean the log from our CI Jenkins console printed by Sonarqube Jenkins plugin? I can only see these WARNs that show the source files not specified in sonar.inclusions. E.g.
02/12/2024 13:11:03 WARN: File not analysed by Sonar, so ignoring coverage: /usr/include/c++/11.3.0/bits/stl_pair.h