Hello SonarCommunity,
I am currently using SonarQube Developer Edition v10.5.1 (90531) for an Angular application, and I’ve encountered an issue regarding code coverage reporting.
We are using Azure DevOps (ADO) to build our application, run unit tests, perform SonarQube analysis, and publish code coverage results. For the Angular application, the lcov.info file is generated, and the reported code coverage in ADO shows 51.1% both on the ADO pipeline UI and locally when running the tests. Additionally, we use the qualitygatecheck@1 plugin to verify the overall code coverage, and it also confirms 51.1% for the entire code.
However, when the same lcov.info file is published to the SonarQube dashboard, it reports an overall code coverage of 45%, which doesn’t match the results from ADO or the local runs. I’ve carefully compared the lcov.info file generated both on the pipeline and locally, and they are identical.
Has anyone else experienced this discrepancy between SonarQube and other tools for code coverage? Any suggestions or insights would be greatly appreciated!
Thank you in advance for your help.