We’re using SonarQube EE version 7.9.4
The flow we are using:
- Every branch is checked out of develop (our main branch on sonar).
- When PRs are created/updated from those branches, gitlab CI starts Sonar PR analysis for them.
- The quality gate looks something like:
- Code smells: 100
- New code smells: 5
- As of now, the develop branch has these sonar measures:
- Code smells: 98
The problem I’m facing:
- I checked out a new branch from develop, and introduced 3 code smells.
- On running the PR analysis on my pull request, the quality gate is not breaking.
- I’m expecting it to break because the total code smells would be 101 in my branch. (more than the specified threshold which is 100).
Is this an expected behaviour? If yes, how can I make my PR analysis to consider overall code smells from quality gate?