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.