Code Duplication Quality Gate on Short-lived branches not working

We are currently running SonarQube 7.5 Developer Edition.

We have builds that run for our feature branches (short-lived) and our main long-lived branch (develop).

The builds have standard/default sets of quality gates running for Maintainability, Security,Reliability and Code Duplication.

We’ve found that the code duplication check doesn’t seem to happen on our short-lived feature branch builds. The scenario looks like this.

Developers create feature branch, add/modify/update code and build.
Build succeeds (or fails on bugs or code smells)
Developer creates pull request to move code to develop branch
Develop branch build runs and fails the Code Duplication quality gate.

It feels like the Code Duplication gate should’ve failed on the feature branch build so that the developer could’ve addressed the issue before moving code that breaks the quality gate.

How can I achieve checking the code duplication quality gate on the short-lived feature branch?


“Real” Quality Gates for Short-Lived Branches are due out in SonarQube v7.7, which should be released this month!

Best regards,


1 Like

Is this released, we still see the same issue where quality gate applied to long-lived branches, but not extended to short-lived branches

Greetings @Amaravathi_Yagati

Please do not bump old threads, as noted in our FAQ

Most of the time, your question will deserve a new topic, containing information specific to your situation. If many topics should be consolidated into one, we’ll take care of it! In addition…

  • Do not bump old posts and try to tag-on with a possibly related issue.

I will close this thread and invite you to create your own thread with more precise details surrounding your issue.