SonarQube C# analysis is not displaying Issues

Hi Sheetal,

Thanks for pointing that out. I had gotten distracted by all the .csproj at the ends of those lines. I suppose the issues are actually being reported on the .cs files at the beginnings of the lines.

Taking another look at your logs, I see this during analysis:

INFO: Indexing files of module 'Link Monitoring'
INFO:   Base dir: X:\mla_src\Link Monitoring
INFO:   Test paths: AssemblyInfo.cs, Event.cs, LinkMonitoring.cs, LinkNodeStates.cs...
INFO: Load project repositories
INFO: Load project repositories (done) | time=122ms
INFO: Indexing files of module 'ProcessRawLogEventsTestProject'
INFO:   Base dir: X:\mla_src\ProcessRawLogEventsTestProject
INFO:   Test paths: ProcessRawLogEventsTest.cs, Properties/AssemblyInfo.cs, package...
INFO: Indexing files of module 'ProcessRawLogTestProject'
INFO:   Base dir: X:\MLA\ProcessRawLogTestProject
INFO:   Test paths: Properties/AssemblyInfo.cs, ProcessRawLogTest.cs, packages.config
INFO: Indexing files of module 'FetchRawLogsTest'
INFO:   Base dir: X:\mla_src\FetchRawLogsTest
INFO:   Test paths: Properties/AssemblyInfo.cs, FetchRawLogsTest.cs, packages.config
INFO: Indexing files of module 'MLAMain'
INFO:   Base dir: X:\mla_src\MLA
INFO:   Test paths: FetchRawLogEvents.cs, LinkMonitoringEvents.cs, MLAMain.cs, MLAA...
INFO: Indexing files of module 'CommonUtilityTest'
INFO:   Base dir: X:\mla_src\CommonUtilityTest
INFO:   Test paths: Properties/AssemblyInfo.cs, CommonUtilityTests.cs, packages.config
INFO: Indexing files of module 'FetchRawLogEventsTestProject'
INFO:   Base dir: X:\mla_src\FetchRawLogEventsTestProject
INFO:   Test paths: Properties/AssemblyInfo.cs, FetchRawLogEventsTest.cs, packages....
INFO: Indexing files of module 'FetchRawLogs'
INFO:   Base dir: X:\mla_src\FetchRawLogs
INFO:   Test paths: Event.cs, FetchRawLogs.cs, InEvents.cs, Local.cs, Properties/As...
INFO: Indexing files of module 'Common'
INFO:   Base dir: X:\mla_src\MLACommon
INFO:   Test paths: AssemblyInfo.cs, IMlaLibrary.cs, InputEventMessages.cs, InvokeE...
INFO: Indexing files of module 'Input Router'
INFO:   Base dir: X:\mla_src\MLAInputRouter
INFO:   Source paths: AssemblyInfo.cs, Event.cs, InputRouter.cs, Local.cs, MessageC...
INFO: Indexing files of module 'ProcessRawLog'
INFO:   Base dir: X:\mla_src\ProcessRawLog
INFO:   Test paths: Event.cs, InEvents.cs, Local.cs, ProcessRawLog.cs, ProcessRawLo...
INFO: Indexing files of module 'CLLE/MLA_Src'
INFO:   Base dir: X:\
INFO: 63 files indexed

I see that most of your code has been categorized as tests. Backing up to the build, we see why, for each project:

SonarCategoriseProject:
  Sonar: (Common.csproj) Categorizing project as test or product code...
  Sonar: (Common.csproj) project is evaluated as a test project based on the 'Microsoft.VisualStudio.TestPlatform.TestFramework' reference.
  Sonar: (Common.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (Link Monitoring.csproj) Categorizing project as test or product code...
  Sonar: (Link Monitoring.csproj) project is evaluated as a test project based on the 'Microsoft.VisualStudio.TestPlatform.TestFramework' reference.
  Sonar: (Link Monitoring.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (Input Router.csproj) Categorizing project as test or product code...
  Sonar: (Input Router.csproj) categorized as MAIN project (production code).
...
SonarCategoriseProject:
  Sonar: (FetchRawLogs.csproj) Categorizing project as test or product code...
  Sonar: (FetchRawLogs.csproj) project is evaluated as a test project based on the 'Microsoft.VisualStudio.TestPlatform.TestFramework' reference.
  Sonar: (FetchRawLogs.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (ProcessRawLog.csproj) Categorizing project as test or product code...
  Sonar: (ProcessRawLog.csproj) project is evaluated as a test project based on the 'Microsoft.VisualStudio.TestPlatform.TestFramework' reference.
  Sonar: (ProcessRawLog.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (MLAMain.csproj) Categorizing project as test or product code...
  Sonar: (MLAMain.csproj) project is evaluated as a test project based on the 'Microsoft.VisualStudio.TestPlatform.Test Framework' reference.
  Sonar: (MLAMain.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (FetchRawLogsTest.csproj) Categorizing project as test or product code...
  Sonar: (FetchRawLogsTest.csproj) SonarQubeTestProject has been set explicitly to True.
  Sonar: (FetchRawLogsTest.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (ProcessRawLogTestProject.csproj) Categorizing project as test or product code...
  Sonar: (ProcessRawLogTestProject.csproj) SonarQubeTestProject has been set explicitly to True.
  Sonar: (ProcessRawLogTestProject.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (ProcessRawLogEventsTestProject.csproj) Categorizing project as test or product code...
  Sonar: (ProcessRawLogEventsTestProject.csproj) SonarQubeTestProject has been set explicitly to True.
  Sonar: (ProcessRawLogEventsTestProject.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (FetchRawLogEventsTestProject.csproj) Categorizing project as test or product code...
  Sonar: (FetchRawLogEventsTestProject.csproj) SonarQubeTestProject has been set explicitly to True.
  Sonar: (FetchRawLogEventsTestProject.csproj) categorized as TEST project (test code).
...
SonarCategoriseProject:
  Sonar: (CommonUtilityTest.csproj) Categorizing project as test or product code...
  Sonar: (CommonUtilityTest.csproj) project has the MSTest project type guid -> test project.
  Sonar: (CommonUtilityTest.csproj) categorized as TEST project (test code).

“Test” code isn’t going to contribute to “lines of code” since it’s not code it’s tests.

So the question is how much actual source code is there in your one MAIN project, MLAInputRouter?

 
Ann