I have followed the SonarCloud Labs for Azure Devops to configure the PR;s but nowhere could I find where I could change these settings. Then I checked the documentation available and also could not find any additional information that would help to specify that it only checks changed code.
Details about our SonarCloud project:
ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
CI system used Azure DevOps
Languages of the repository are SQL, C# and JavaScript
Our SonarCloud project is private so unfortunately can’t share the URL
The issue currently reported, is on a new feature branch and I can’t find that it has been flagged on our default branch either.
We have had SonarCloud implemented on our code base about two years, but only recently started with the PR decorations and it’s flagging lot of code.
So, of course, these need to be resolved but currently, we just want to check the code that changed in the PR. From the screenshot, you can see that that line of code was unchanged. A colleague mentioned that he read somewhere that it should just check the new code and wondering if we can configure it somewhere.
If there have been some file move or renaming, those issues might be raised if they have not been before, so if you didn’t find this issue on any branch, i think that this is the normal behavior then.
@mickaelcaro we have not moved or renamed the files, and in this example that commented line has been there for a while. So we are wondering why it is now being flagged since it’s not new.
On this one PR we have found more than 50 issues flagged, that is not related to the code changes made. Therefore feel that they are incorrectly being flagged during the PR. It’s also not just this branch but many others as well.
Is there a way we could perhaps configure the “sensitivity” of how the items get flagged?
No in this instance the target branch was a feature branch that was recent created from the Master-branch.
We are nearing the LOC count of our plan and I am wondering if that might not be also causing the issue since it can’t complete the analysis of the other branches.
@mickaelcaro I am going to do a bit more digging on our SonarCloud setup and will then perhaps ask for your guidance again, but thank you for your assistance so far.