Sometimes SonarQube not analyzing all sub modules in large project

  • SonarQube: 7.9.4v

I am trying to analyze the large dotcom project which actually contains the multiple sub projects(.csproj). Here I am using the MSBuild step in TeamCity Server to build the solution between the begin and end analysis steps. After completing the end analysis step some times we observed that there is a drastic change in SonarQube Metrics as shown in below activity graph.

Then I compared the TeamCity builds logs as the one which is analyzed all sub projects and one which analyzed few sub projects as shown below.

Below log depicts complete project analysis (Here each sub project can contain SonarQube related targets):

Below log depicts some modules were not analyzed because of missing the SonarQube targets:
Less-Modules Analyzed

Please find the different ProjectInfo files for same project under .sonarqube\out folder

ProjectInfo - Fully Analyzed.log (6.5 KB) ProjectInfo - Partailly Analyzed.log (721 Bytes)

Could you please help on this?

Thanks in advance!

Can anyone please help me on this?

Hi @Nagendra_Raja

on https://docs.sonarqube.org/latest/analysis/analysis-parameters/ you may be interested in the sonar.scm.exclusions.disabled property

For supported engines, files ignored by the SCM, i.e. files listed in .gitignore , will automatically be ignored by analysis too. Set this property to true to disable that feature. SCM exclusions are always disabled if sonar.scm.disabled is set to true .

I hope this helps

Thanks
Andrei

Thank you @Andrei_Epure,

I have added this parameter (sonar.scm.exclusions.disabled=true) and observed the few builds. But still facing the same issue.

Hi @Nagendra_Raja. Could you please clarify what you mean?

Also, I see in the Partially Analyzed log the fact that you have some test projects. You can read Analysis of product projects vs. test projects to see if the projects are excluded because they are identified as test projects.