EMERGENCY - Sonarqube not Analyzing project that should be analyzed

I need to report an issue that has occurred with my team’s SonarQube project analysis. We noticed this morning after the main branch scan that an entire folder was omitted from the scan.


I cropped out the folder names, but you can see that the one in the middle was not scanned. This is in spite of the project being configured for scanning. I am actively combing the logs, but I did not see any indication that the folder was excluded from analysis. Even more than that, if there were no mesurable lines of code, how could there be maintainability issues attached to them?

I’ll post pertinent info as I have it, but in the mean time, what should I be looking for specifically?
UPDATE: What makes this even stranger is that the proejct in question is categorized as a main project and set for analysis.:

SonarCategoriseProject:

Sonar: (.csproj) Categorizing project as test or product code…

Sonar: (.csproj) SonarQubeTestProject has been set explicitly to false.

Sonar: (.csproj) categorized as MAIN project (production code).

Sonar issues were emitted to the log as well.

I forgot this also bears mentioning: The previous release scanned the entire directory with no issues. I cannot find any indication in the logs that anything failed. I’m requesting that this be immediately escalated as an incident.

I compared the SonarScanner contexts for the previous scan and the current one. For some reason, the one that worked had an empty sonar.test section and a large sonar.sources section. However, the scan that’s failing has a large sonar.test section, even though we configured the pipeline so that every file would be considered a main file and be analyzed.

Hey @Coliwack, SonarQube doens’t count lines of code for test code. Based on your screenshot and on what you described, it looks as if that directory is being indexed by the scanner (it shows up in the UI), it is indeed being analyzed (issues are reported on it), but is being classified as test code (no LOC are reported).

You mentioned that you found the scanner context corresponding to a scanner run where the LOC count for this folder was missing, and that the sonar.test prop had a list of paths. Do any of these paths match this folder (or rather, the files in this folder)?