Pull request has violations but still mark the quality gate as passed

Must-share information (formatted with Markdown):

  • SonarQube:
    Gradle Plugin: 2.3
  • To run the sonar analysis for each pull request and check for a code violation and mark the build as failed
  • I followed the documentation provided and able to create pull request analysis on the sonarQube. My PR has lot of issues but still it was marked as quality gate as passed.

Hi Romender, welcome to the SonarSource Community!

Your quality gate contains only criteria for overall code, whereas pull requests are only checked for violations of criteria for new code. If you add criteria for new code to your quality gate, I bet you’ll start to see failure in the PR.

Thanks, @Jeff_Zapotoczn. Can you show me where I need to change? If possible an example or any kind of documentation.

@Romender_Singh A user with the Administer Quality Gates permission can edit the conditions in a Quality Gate.