Sonar Cloud PR Analysis

I’m facing an issue with PR analysis in a .NET Framework 4.8 project. The project includes:
A database project with .sql files
A web application with JavaScript and CSS files
When I raise a PR, the Azure DevOps pipeline is triggered with the following steps:
Prepare Analysis – SonarCloudPrepare@4, scannerMode: dotnet
Build Project – VSBuild@1
Run Analysis – SonarCloudAnalyze@4
Publish Results – SonarCloudPublish@4
i tried putting UseLegacyScanner: true

The pipeline runs successfully, but the PR analysis does not detect the changed files or dose not catch the issues in the code. For example, even when multiple files are changed, the analysis reports SCM reported changed lines for 0 files in the branch. below is the code i added to simulate the analysis.

public class SonarTest
{
public void Test()
{
int unused = 5;

     // TODO fix

     //DummyCommand

     while (true)
     {
     }
 }
}

Questions:

Is PR analysis fully supported for .NET Framework 4.8 projects with database and web projects included?
Are there additional settings required to correctly detect changed files in PRs?
Are there any limitations for incremental PR analysis on older .NET Framework versions or mixed project types?
Any guidance or recommended configuration to resolve this would be appreciated.

Thanks in advance.

Hi,

Your framework version shouldn’t be a problem, although you may need to adjust your build.

Do you have the prerequisites in place for PR analysis?

And, as a secondary question, how recently was your PR base branch analyzed?

 
Ann