Quality showing as failed

q_gate
pull-request

(Sufyan Haroon) #1

I have created a simple quality gate which says that number of new critical and blocker issues should be zero. This quality gate is passing on each PR I raise but is failing on analysis of master branch. It shows at the top the count for both blocker and critical issues are zero and are expected to be zero but it always fails. I am unable to find why this is happening. Logs also do not indicate any reason for the same.

Any help would be greatly appreciated.


(Julien Lancelot) #2

Hi,

There’s no quality gate on PR, it’s only a status that is displayed.
We’re working to improve this on https://jira.sonarsource.com/browse/MMF-1369.

Feel free to have a look and have a discussion on this thread if you feel it won’t feet your needs.

Regards,
Julien Lancelot


(Sufyan Haroon) #3

Hi, Julien,

Can you please elaborate on this? From the jira issue, it seems there is not way to specify separate quality gates for PRs and main code. Currently, I am using approach one of applying quality gate on new code only so that works for PR as well.

By the way I was able to solve the issue by deleting the project and recreating it. I think the issue was due that my trial license had expired and I had an analysis which blocked due to expired license. When I reapplied a new license, it was not able to turn the QG status from Red to Green even though no issue exists in the main code. May be a bug.

Regards,
-SH


(Sufyan Haroon) #4

Hi,

I am again facing this issue. Regardless of whether I run analysis on a PR or a normal builds, once the quality gate turns RED, it never turns back to Green even when no issues are reported. Initially, it is turning RED randomly without reporting of any issues in the scan. Is this a bug?
I am running SonarQube server 7.3 Developer Edition with a trial license. Can somebody help me with this?