I am using SonarCloud analysis in Docker (from Azure DevOps), for solution (more than 100 .NET 6 projects).
Following logs everything seems fine - projects are being scaned by Sonar and I am getting a message that sonarcloud analysis is successful as well.
But, when I am checking results in sonarcloud.io, on the dahsboard i can notice that LOC, Duplications, Coverage and other stats are empty - except code smells.
lens-sonar | INFO: Adding this code coverage report to the cache for later reuse: /lens/src/./dotCover.Output.html
lens-sonar | INFO: Coverage Report Statistics: 3081 files, 50 main files, 50 main files with coverage, 3031 test files, 0 project excluded files, 0 other language files.
lens-sonar | INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=1454ms
lens-sonar | INFO: Sensor Zero Coverage Sensor
lens-sonar | INFO: Sensor Zero Coverage Sensor (done) | time=2ms
lens-sonar | INFO: SCM Publisher No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
lens-sonar | INFO: CPD Executor 16 files had no CPD blocks
lens-sonar | INFO: CPD Executor Calculating CPD for 47 files
lens-sonar | INFO: CPD Executor CPD calculation finished (done) | time=57ms
lens-sonar | INFO: Analysis report generated in 1361ms, dir size=29 MB
lens-sonar | INFO: Analysis report compressed in 4160ms, zip size=10 MB
lens-sonar | INFO: Analysis report uploaded in 12858ms
lens-sonar | INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=Xxxx_xxxx
lens-sonar | INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
lens-sonar | INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AYHQLqx5cuUBuKXVTAXX
lens-sonar | INFO: Analysis total time: 55.742 s
lens-sonar | INFO: ------------------------------------------------------------------------
lens-sonar | INFO: EXECUTION SUCCESS
lens-sonar | INFO: ------------------------------------------------------------------------
lens-sonar | INFO: Total time: 1:36.959s
lens-sonar | INFO: Final Memory: 51M/180M
lens-sonar | INFO: ------------------------------------------------------------------------
lens-sonar | The SonarScanner CLI has finished
lens-sonar | 21:05:30.373 Post-processing succeeded.
You are right with a cause - all other projects are categorized as Test projects, I am not sure why, cause definitely their names doesn’t include “Tests”.
Anyway, as solution I marked explicitly all my non-test projects with: