Version: Enterprise Edition Version 8.4.2 (build 36762)
We analyze each branch (using branch analysis) before merging to the default branch through a PR. Each reviewer looks at the sonar analysis to ensure no failing quality gate issues are merged. The problem is, that it happens that the branch has a “passed” but after the merge the default branch got a “fail”.
The issue is present on the feature branch, but not detected as “new code” and therefore not taken into account to calculate the quality gate.
Is this a glitch/bug/defect? Or is it something that needs tweaking from our side?
Here is a function that was present in the default branch but was changed on the feature branch, so much that it fails on the cognitive complexity rule.