I have SonarQube server 5.6 and I am using Github. I have done the integration to setup Sonar Github plugin but I fail to understand whether this should report if the new code does not meet the code coverage threshold setup in the Quality Gate.
In the Quality Gate I have defined an error to be raised unless there is more than 75% code coverage for the new code that is being introduced by a Pull Request.
Thanks!
xml file, we'll run mvn clean install to build our project. Then we'll start the SonarQube server before running the command mvn sonar:sonar. Once this command runs successfully, it will give us a link to the dashboard of our project's code coverage report: Notice that it creates a file named jacoco.
SonarQube itself does not calculate coverage. To include coverage results in your analysis, you must set up a third-party coverage tool and configure SonarQube to import the results produced by that tool. Below, you'll find guidelines and resources, as well as language- and tool-specific analysis parameters.
Pull request analysis cannot currently raise all types of issues. Specifically it cannot raise issues related to metrics because those are consolidated on the server side during analysis report processing and in a Pull Request analysis the analysis report is by design never submitted to the server.
EDIT The PR analysis which is offered as part of the Developer Edition($) does both decorate the PR in the provider (e.g. GitHub) and show the PR on the server. However, metric-related issues still don't show up in this enhanced analysis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With