Pull request issue

Hello,

I have a PR analysis done on a project in Azure pipeline and the analysis doesnt show up any issues in sonarUI for the code.
But when the PR is merged in to the branch and analysis is performed then the issues are generated for the same piece of code.

using SonarQube 8.5

Could someone explain the reason??

Hi,

It might be helpful to understand what issues/rules we’re talking about here. Is there a pattern?

 
Ann

Ann, I have just checked from 8.5 documentation that the PR branch has to be checked out in order for the analysis to be performed…

This pre-requistite was not present for 8.0 version.

Could you please explain the difference?

Hi,

Whether or not it has always been explicit in the docs in this context, it has always been a requirement to check out the code you want to analyze.

 
Ann

okay…I have realized PR analysis will only throw if particular commit had introduced it.
But it doesnt analyze the whole file in which commit had happened.

Is this existing behavior from 8.1 V? As I havent noticed this in 8.0 version.

Hi,

IIRC, you’re only going to see in PR analysis the issues that are new on lines changed in the PR. Regarding 8.0, the behavior was probably tuned since then. We’re trying to strike the delicate balance between over- and under-reporting.

 
Ann