We’re using Sonarcloud but the “New Code” definition does not fully work for us and our workflows. We are checking the amount of new lines as a rule for Quality Gate, and have a limit of 800. This is useful for us in PRs. The problem is that this same rule applies for the long lived branches, like develop. We are a lot of developers and are constantly merging into develop. Because of this, Quality Gate is always failing since none of the “New Code” definitions work for us.
We would like quality gate to compute agains the previous commit for a given branch, but we do not know if it is possible to achieve that. If it’s not possible, then we’d like to have a different set of rules for short and long lived branches but we don’t know how to achieve that.