Long lived branches: quality gate does not fail in first analysis


(Kumar Gaurav) #1

Dear All,

Continuing the discussion from old forum:

I see that following workaround is not quite working strangely:

git checkout master
mvn sonar:sonar -Dsonar.branch.name=my_branch
git checkout my_branch
mvn sonar:sonar -Dsonar.branch.name=my_branch

I see quality gate passed even if there are obvious failures (related to new code coverage and new duplicate codes quality gate conditions) in my branch code. Its only after the next analysis when the quality gate fails if there are more failing changes.

So under that scenario I think https://jira.sonarsource.com/browse/MMF-1265 should get priority as there is no workaround currently to the issue. Or please provide some suggestions/workaround.

We have no idea whether code will pass quality gate before merging. Resolving a sonar issue after merge goes through the usual loop of dev -> review -> merge -> build and so its hard to convince some people to use it.

Thanks a lot,