SonarLint in Rider doesn't report any issue

Info:

  • Windows 10
  • Rider 2022.2.3
  • SonarLint 7.1.1.54565
  • Connacted to: Server SonarQube
  • Solution: NET5 49 projects

Settings:
image

LOG:

Using connection 'XXX' for project 'XXX'
Analysing 1376 files...
Found 0 issues

Please help me :slight_smile:

Hi @PiotrFerenc

I moved your post to a different thread, since the issue on the other thread has been investigated already, and here it might be a different case.

I see you have enabled loadProjectsOnDemand. Is it because you observed a timeout loading the solution?

Also, setting useNet6 to false should be reserved for old framework projects. If you have a NET5 project, it should work fine to run SonarLint with a .Net 6 runtime.

To investigate your issue, I suggest:

  • clear all the properties you have defined
  • enable verbose logs in the SonarLint console
  • close all open editors in Rider
  • close and reopen your solution
  • trigger the analysis of a single C# file (just opening a file should be enough)
  • collect the logs, and see if there are any interesting issue while loading your solution

I see you have enabled loadProjectsOnDemand . Is it because you observed a timeout loading the solution?

No, only for testing.

LOG


Creating container for module 'Module: 'rider.module''
GET 200 https://xx.xxsonarqube.xx.xxxx.xx/api/system/status | response time=23ms
Downloaded server infos in 24ms
GET 200 https://xx.xxsonarqube.xx.xxxx.xx/api/system/status | response time=25ms
Downloaded server infos in 25ms
GET 200 https://xx.xxsonarqube.xx.xxxx.xx/api/system/status | response time=23ms
Downloaded server infos in 22ms
GET 200 https://xx.xxsonarqube.xx.xxxx.xx/api/system/status | response time=23ms
Downloaded server infos in 22ms
Trigger: EDITOR_OPEN
[Editor open] 1 file(s) submitted
0 entries removed from the store
GET 200 https://xx.xxsonarqube.xx.xxxx.xx/api/system/status | response time=23ms
Downloaded server infos in 24ms
Configuring analysis with org.sonarlint.intellij.rider.RiderAnalysisConfigurator
Using connection 'xx.xx' for project 'fo.xx.xxxxx::feature'
Analysing 'MapperNotFoundException.cs'...
Starting analysis with configuration:
[
  projectKey: fo.xx.xxxxx::feature
  baseDir: C:\Projects\fo.xx.xxxxx\src
  extraProperties: {sonar.cs.internal.solutionPath=C:\Projects\fo.xx.xxxxx\src\Fo.xx.xxxxx.sln, sonar.cs.internal.dotnetCliExeLocation=C:\Program Files\dotnet\dotnet.exe, sonar.cs.internal.msBuildPath=C:\Program Files\dotnet\sdk\5.0.401}
  moduleKey: Module: 'rider.module'
  inputFiles: [
    file:///C:/Projects/fo.xx.xxxxx/src/Fo.xx.xxxxx.Application/Validation/ExceptionToRequestErrorsMapping/Exceptions/MapperNotFoundException.cs (UTF-8)
  ]
]

Done in 522ms

Processed 0 issues
Found 0 issues
Trigger: ACTION
[Action] 1 file(s) submitted
Configuring analysis with org.sonarlint.intellij.rider.RiderAnalysisConfigurator
Using connection 'xx.xx' for project 'fo.xx.xxxxx::feature'
Analysing 'MapperNotFoundException.cs'...
Starting analysis with configuration:
[
  projectKey: fo.xx.xxxxx::feature
  baseDir: C:\Projects\fo.xx.xxxxx\src
  extraProperties: {sonar.cs.internal.solutionPath=C:\Projects\fo.xx.xxxxx\src\Fo.xx.xxxxx.sln, sonar.cs.internal.dotnetCliExeLocation=C:\Program Files\dotnet\dotnet.exe, sonar.cs.internal.msBuildPath=C:\Program Files\dotnet\sdk\5.0.401}
  moduleKey: Module: 'rider.module'
  inputFiles: [
    file:///C:/Projects/xxx/MapperNotFoundException.cs (UTF-8)
  ]
]

Done in 2392ms

Processed 0 issues
Found 0 issues


WEB:

Screen from VS

Please look at the other thread, where I explain the logs that are interesting to investigate (basically we need OmniSharp startup logs).

Once OmniSharp has started (and possibly failed to load your solution), the logs about individual analyses are not telling much.