Do SonarCloud scans for new code (Pull Request) check all rules in every scan? Or are rules checked conditionally, based on what code changes are included?
if rules are applied conditionally, can they affect other code areas?
We experience a weird behavior that could maybe be explained by this:
(this is just one example, but it happens in many different code areas, with various bug/smell types)
PR from branch B to C (containing changes from A and many more branches) - Sonar scan complains about Duplicate key ‘components’ bug. This bug must have been detected and fixed in first PR, why do we see it in the second one instead?
Our theory is, that if rules are applied conditionally - first PR did not trigger ruleset which contained * Duplicate key ‘components’*. changes in other PRs to B introduced more types of code and therefore more rules applied. Therefore PR from B to C now contains ‘new code’ with more rules applied. Can this be the case?
Anyone can confirm this theory or point us to the right direction to get this scenario resolved?