Issues on PR not detected

Hello,

We are facing an issue with Sonar where issues are not being detected on pull-requests.

Once the pull-request is merged into main, the main scan fails. This is not related to the topic where we expect to detect issues on unchanged code.

We traced back one example, where the scan failed on main due to “unused” field.
We checked the pull-request where this field was introduced, and checked its corresponding scan.
The scan had passed, although we could see in the “code” section that sonar had indeed detected the introduction of this new field as part of the change.

We tried to replicate the scenario on a new pull-request but we weren’t successful.

So, we’re not sure what is the exact replication scenario.

Can you please help us out?

Hi,

Welcome to the community!

There’s not a lot to go on here. Could you maybe ping us again on this thread when you have a reproducer?

 
Thx,
Ann