Code smell not triggered on pull request levels, only on main branch

We have a code smell (Cognitive Complexity) that was not detected on the pull request, but then was detected on the main branch when it was merged. We are using Bitrise and SonarQube.

Can we have the check triggered on the pull request so that we catch it before it reaches main?

Here’s the version of SonarQube we are using:

version 1.0.9


Pull request analysis doesn’t report issues on old code - even ones that are new in the PR.

Since method-level issues like Cognitive Complexity are reported on the method signature, which I assume didn’t change in your PR, it was suppressed in the PR analysis report.

That is, this is - unfortunately - working as designed.

And BTW, you should make sure you’re on the latest versions of everything. the current version of SonarScanner is 4.8.


Thank you for replying. Appreciate it.