How to report code coverage in Github Pull requests using the Sonar Github plugin

I have a SonarQube 5.6 server and I'm using Github. I did the integration to install the Sonar Github plugin, but I don’t understand whether this should indicate whether the new code does not match the setting of the code coverage threshold in Quality Gate.

In Quality Gate, I defined an error that will be raised if there is no more than 75% of the code coverage for the new code that is entered using the Pull request.

  • If the Sonar Github plugin reports a problem (comment) in a Github pull request, if the newly added code does not match the Quality Gate metric I installed?
  • Is there a way to specify in Github Pull Requests if new code trying to be merged does not meet coverage expectations?

Thanks!

+5
source share
1 answer

Pull query analysis cannot currently address all types of problems. In particular, it cannot raise the problems associated with metrics, since they are consolidated on the server side during the analysis report processing and in the Pull Request analysis, the analysis of the design report is never sent to the server.

+6
source

Source: https://habr.com/ru/post/1267031/


All Articles