Files missing on Sonarqube portal

  • which versions are you using SonarQube
  • how is SonarQube deployed: zip
    Hi,

For some reason SonarQube is not showing all the issues, For example: In the “Run Code Analysis” task of my Azure DevOps pipeline I can see several warnings on an specific file (WODRepositoryEF):

/home/az_devops_agent/agent/_work/22/s/src/KSaaS/KSaaS.Data.EntityFramework/DataAccess/WODRepositoryEF.cs(227,32): warning S125: Remove this commented out code. (C# static code analysis) [/home/az_devops_agent/agent/_work/22/s/src/KSaaS/KSaaS.Data.EntityFramework/KSaaS.Infraestructure.EntityFramework.csproj]
##[warning]src/KSaaS/KSaaS.Data.EntityFramework/DataAccess/WODRepositoryEF.cs(248,13): Warning S125: Remove this commented out code. (C# static code analysis)
##[debug]Processed: ##vso[task.logissue type=Warning;sourcepath=/home/az_devops_agent/agent/_work/22/s/src/KSaaS/KSaaS.Data.EntityFramework/DataAccess/WODRepositoryEF.cs;linenumber=248;columnnumber=13;code=S125;]Remove this commented out code. (C# static code analysis)

But, When browsing the sonarqube portal I am unable to locate the file, it is not listed anywhere. This happens with many other files, what could I be doing wrong?

Hi,

Can you check the exclusions set on the project - either in the UI or as analysis parameters? I suspect that these ‘missing’ issues are being raised on excluded files.

The SonarScanner for .NET handles exclusions differently than the other scanners: it still iterates over excluded files (hence the log lines) and then filters out results for those files at the end.

 
HTH,
Ann

Hi Ann

Thank you! you were right I just had to tweak the sonar inclusions.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.