Conditions for quality gate - branches

hi we are using SonarQube enterprise edition.

i would like to understand what is the difference between setting the conditions between:

  1. Apply to all branches
  2. Apply to branches only.

Somehow, the quality gate does not fail/block on feature branch when we use quality gate with condition (overall code and branches only).

When we use the quality gate with this additional condition (new code and to all branches), the quality blocks the feature branch when it failed the quality gate.

Hey there.

What version of SonarQube are you using? This information is requested in the template post, and can be found in the footer of your instance.

Enterprise edition - version 9.9.4 (build 87374)


To be clear, SonarQube Quality Gates can include conditions on New Code and Overall Code.

When analyzing branches, both conditions will apply.

When analyzing pull requests, only the conditions on new code will apply (because only the new code is being analyzed and reported on)

Does that clear things up?

sorry. not really. i understand the difference between new code and overall code. My question is the difference between

  1. Apply to all branches
  2. Apply to branches only.

Can you take a screenshot of where you’re seeing this in the UI?

Apply to branches only


The point here is that Conditions on Overall Code don’t apply to pull requests.