Linting not working with Rider

I am not seeing any report in rider.
Its not connected to SonarQube or SonarCloud, could it be used like this?
The project is a Unity project, Is there no support for C# project made through Unity?

On running analyze manually, here is the log I received.

Trigger: ACTION
[Action] 1 file(s) submitted
Configuring analysis with org.sonarlint.intellij.rider.RiderAnalysisConfigurator
Analysing 'Timer.cs'...
Starting analysis with configuration:
[
  baseDir: D:\Sekai\Work\Professional\Projects\InnerSim
  extraProperties: {}
  moduleKey: Module: 'rider.module'
  excludedRules: []
  includedRules: [csharpsquid:S2931]
  ruleParameters: {}
  inputFiles: [
  ]
]

Start analysis
Index files
0 files indexed
'OmniSharp' skipped because there is no related file in current project
Execute Sensor: Sonar Secrets Detection Sensor
Done in 5ms

Processed 0 issues
Found 0 issues

Rider version: 2021.2
SonarLint version: 6.3.1.40498

Hi @rYuuk

Looks like the analysis is run with an empty list of file.

How did you trigger the analysis? From the screenshot it seems you did a manual run (right click on a file or folder → SonarLint → analyze). Can you tell me on which type of element you did the action (entire solution, project, folder, single file, …)?

Also if you open a C# file, SonarLint should automatically analyze this file. Is this use case working for you?

Yes I ran it manually on single file, but its not working for any scripts I open.

Are you trying to analyze a C# file? Sorry if my question looks stupid, but I’m not familiar with Unity, so I don’t know what is a “script” in this context.

Yeah its a C# file and the whole project is a C# solution project.

Hi @rYuuk

May I ask you to enable verbose + analysis logs in the SonarLint log tab, then reopen your project (or better restart Rider).

You should have quite a few logs from Omnisharp that might be useful if you can share.

On my side I created a sample Unity project and I got a different error than you (in fact OmniSharp totally failed to load the project):

Starting OmniSharp...
Omnisharp: [DEBUG] Loaded OmniSharp.Cake, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.DotNetTest, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Host, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.MSBuild, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Roslyn, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Roslyn.CSharp, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Script, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Shared, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [INFORMATION] Starting OmniSharp on fedora 34.0 (x64)
Omnisharp: [INFORMATION] DotNetPath set to dotnet
Omnisharp: [DEBUG] .NET SDK requires MSBuild instances version 16.3.0 or higher
Omnisharp: [DEBUG] Can't use installed Mono because OmniSharp isn't running on it
Omnisharp: [INFORMATION] Located 1 MSBuild instance(s)
            1: StandAlone 16.11.0 - "/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin"
Omnisharp: [DEBUG] MSBuild instance StandAlone 16.11.0 scored at 1
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.dll' (name-only).
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Utilities.Core.dll' (name-only).
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Framework.dll' (name-only).
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.dll' (name-only).
Omnisharp: [INFORMATION] MSBUILD_EXE_PATH environment variable set to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
Omnisharp: [INFORMATION] Registered MSBuild instance: StandAlone 16.11.0 - "/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            MSBuildToolsPath = /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
            CscToolPath = /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=3.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Features, Version=3.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.VisualBasic.Features.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Workspaces.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Workspaces.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Features.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Features.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Features.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Features.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.Features.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.Features.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.Features.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.Features.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Features.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Features.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Features.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Features.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Features.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Features.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Features.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Features.resources.dll'.
Omnisharp: [DEBUG] Starting with OmniSharp options: {"RoslynExtensionsOptions":{"EnableDecompilationSupport":false,"EnableAnalyzersSupport":false,"EnableImportCompletion":false,"EnableAsyncCompletion":false,"DocumentAnalysisTimeoutMs":10000,"LocationPaths":null},"FormattingOptions":{"OrganizeImports":false,"EnableEditorConfigSupport":false,"NewLine":"\n","UseTabs":false,"TabSize":4,"IndentationSize":4,"SpacingAfterMethodDeclarationName":false,"SpaceWithinMethodDeclarationParenthesis":false,"SpaceBetweenEmptyMethodDeclarationParentheses":false,"SpaceAfterMethodCallName":false,"SpaceWithinMethodCallParentheses":false,"SpaceBetweenEmptyMethodCallParentheses":false,"SpaceAfterControlFlowStatementKeyword":true,"SpaceWithinExpressionParentheses":false,"SpaceWithinCastParentheses":false,"SpaceWithinOtherParentheses":false,"SpaceAfterCast":false,"SpacesIgnoreAroundVariableDeclaration":false,"SpaceBeforeOpenSquareBracket":false,"SpaceBetweenEmptySquareBrackets":false,"SpaceWithinSquareBrackets":false,"SpaceAfterColonInBaseTypeDeclaration":true,"SpaceAfterComma":true,"SpaceAfterDot":false,"SpaceAfterSemicolonsInForStatement":true,"SpaceBeforeColonInBaseTypeDeclaration":true,"SpaceBeforeComma":false,"SpaceBeforeDot":false,"SpaceBeforeSemicolonsInForStatement":false,"SpacingAroundBinaryOperator":"single","IndentBraces":false,"IndentBlock":true,"IndentSwitchSection":true,"IndentSwitchCaseSection":true,"IndentSwitchCaseSectionWhenBlock":true,"LabelPositioning":"oneLess","WrappingPreserveSingleLine":true,"WrappingKeepStatementsOnSingleLine":true,"NewLinesForBracesInTypes":true,"NewLinesForBracesInMethods":true,"NewLinesForBracesInProperties":true,"NewLinesForBracesInAccessors":true,"NewLinesForBracesInAnonymousMethods":true,"NewLinesForBracesInControlBlocks":true,"NewLinesForBracesInAnonymousTypes":true,"NewLinesForBracesInObjectCollectionArrayInitializers":true,"NewLinesForBracesInLambdaExpressionBody":true,"NewLineForElse":true,"NewLineForCatch":true,"NewLineForFinally":true,"NewLineForMembersInObjectInit":true,"NewLineForMembersInAnonymousTypes":true,"NewLineForClausesInQuery":true},"FileOptions":{"SystemExcludeSearchPatterns":["**/node_modules/**/*","**/bin/**/*","**/obj/**/*","**/.git/**/*"],"ExcludeSearchPatterns":[]},"RenameOptions":{"RenameOverloads":false,"RenameInStrings":false,"RenameInComments":false},"ImplementTypeOptions":{"InsertionBehavior":null,"PropertyGenerationBehavior":null},"Plugins":{"LocationPaths":null}}
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Workspaces.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Workspaces.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll'.
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
Omnisharp: [INFORMATION] Detecting Cake files in '/home/julien/Unity/Projects/Sample'.
Omnisharp: [INFORMATION] Could not find any Cake files
Omnisharp: [DEBUG] MSBuild environment: 
Mode: Standalone
RunningTests: False
RunningInVisualStudio: False
MSBuildToolsDirectory32: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
MSBuildToolsDirectory64: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
MSBuildSDKsPath: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Sdks
CurrentMSBuildConfigurationFile: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/MSBuild.exe.config
CurrentMSBuildExePath: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/MSBuild.exe
CurrentMSBuildToolsDirectory: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
VisualStudioInstallRootDirectory: 
MSBuildExtensionsPath: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin

Omnisharp: [DEBUG] 'MSBuildExtensionsPath' set to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild'
Omnisharp: [DEBUG] 'CscToolPath' set to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Roslyn'
Omnisharp: [DEBUG] 'CscToolExe' set to 'csc.exe'
Omnisharp: [INFORMATION] Detecting projects in '/home/julien/Unity/Projects/Sample/Sample.sln'.
Omnisharp: [DEBUG] Parsing ProjectConfigurationPlatforms of '/home/julien/Unity/Projects/Sample/Sample.sln'.
Omnisharp: [INFORMATION] Queue project update for '/home/julien/Unity/Projects/Sample/Assembly-CSharp.csproj'
Omnisharp: [INFORMATION] Detecting CSX files in '/home/julien/Unity/Projects/Sample'.
Omnisharp: [INFORMATION] Could not find any CSX files
Omnisharp: [INFORMATION] Configuration finished.
Omnisharp: [INFORMATION] Omnisharp server running using Stdio at location '/home/julien/Unity/Projects/Sample' on host 61276.
OmniSharp successfully started
Waiting for solution/project configuration to be loaded...
Omnisharp: [INFORMATION] Loading project: /home/julien/Unity/Projects/Sample/Assembly-CSharp.csproj
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.resources, Version=15.1.0.0, Culture=fr-FR, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.resources, Version=15.1.0.0, Culture=fr, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.Tasks.Core.resources, Version=15.1.0.0, Culture=fr-FR, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.Tasks.Core.resources, Version=15.1.0.0, Culture=fr, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.resources.dll'.
Can't find custom attr constructor image: /home/julien/Unity/Projects/Sample/Library/ScriptAssemblies/Unity.Rider.Editor.dll mtoken: 0x0a000007 due to: Could not find method '.ctor' due to a type load error: Could not set up parent class, due to: Could not set up parent class, due to:  assembly:/home/julien/Unity/Hub/Editor/2020.3.25f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Object member:(null) assembly:/home/julien/Unity/Hub/Editor/2020.3.25f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Attribute member:(null) assembly:/home/julien/Unity/Projects/Sample/Library/ScriptAssemblies/UnityEngine.TestRunner.dll type:TestRunCallbackAttribute member:(null) assembly:/home/julien/Unity/Projects/Sample/Library/ScriptAssemblies/UnityEngine.TestRunner.dll type:TestRunCallbackAttribute member:(null)
Omnisharp: [ERROR] The "ResolveAssemblyReference" task failed unexpectedly.
System.TypeLoadException: Could not find method '.ctor' due to a type load error: Could not set up parent class, due to: Could not set up parent class, due to:  assembly:/home/julien/Unity/Hub/Editor/2020.3.25f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Object member:(null) assembly:/home/julien/Unity/Hub/Editor/2020.3.25f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Attribute member:(null) assembly:/home/julien/Unity/Projects/Sample/Library/ScriptAssemblies/UnityEngine.TestRunner.dll type:TestRunCallbackAttribute member:(null)
  at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesDataInternal(System.Reflection.ICustomAttributeProvider)
  at System.MonoCustomAttrs.GetCustomAttributesDataBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) [0x00010] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.MonoCustomAttrs.GetCustomAttributesData (System.Reflection.ICustomAttributeProvider obj, System.Boolean inherit) [0x00011] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.Reflection.CustomAttributeData.GetCustomAttributes (System.Reflection.Assembly target) [0x00000] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.Reflection.RuntimeAssembly.GetCustomAttributesData () [0x00000] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Microsoft.Build.Tasks.AssemblyInformation.GetFrameworkName () [0x00025] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.AssemblyInformation.get_FrameworkNameAttribute () [0x00028] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.AssemblyDependency.AssemblyMetadata..ctor (System.String path) [0x00019] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.AssemblyInformation+<>c.<GetAssemblyMetadata>b__21_0 (System.String p) [0x00000] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].GetOrAdd (TKey key, System.Func`2[T,TResult] valueFactory) [0x00034] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Microsoft.Build.Tasks.AssemblyInformation.GetAssemblyMetadata (System.String path, System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue] assemblyMetadataCache, Microsoft.Build.Shared.AssemblyNameExtension[]& dependencies, System.String[]& scatterFiles, System.Runtime.Versioning.FrameworkName& frameworkName) [0x00006] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at (wrapper delegate-invoke) <Module>.invoke_void_string_ConcurrentDictionary`2<string, AssemblyMetadata>_AssemblyNameExtension[]&_string[]&_FrameworkName&(string,System.Collections.Concurrent.ConcurrentDictionary`2<string, Microsoft.Build.Tasks.AssemblyDependency.AssemblyMetadata>,Microsoft.Build.Shared.AssemblyNameExtension[]&,string[]&,System.Runtime.Versioning.FrameworkName&)
  at Microsoft.Build.Tasks.SystemState.GetAssemblyMetadata (System.String path, System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue] assemblyMetadataCache, Microsoft.Build.Shared.AssemblyNameExtension[]& dependencies, System.String[]& scatterFiles, System.Runtime.Versioning.FrameworkName& frameworkName) [0x00010] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.ReferenceTable.GetUnifiedAssemblyMetadata (Microsoft.Build.Tasks.Reference reference, System.Collections.Generic.IEnumerable`1[Microsoft.Build.Tasks.UnifiedAssemblyName]& unifiedDependencies, System.String[]& scatterFiles) [0x00023] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.ReferenceTable.FindDependenciesAndScatterFiles (Microsoft.Build.Tasks.Reference reference, System.Collections.Generic.List`1[T] newEntries) [0x0003a] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.ReferenceTable.FindAssociatedFiles () [0x000ea] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure () [0x0000a] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (System.Collections.Generic.IEnumerable`1[T] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.Generic.List`1[T] exceptions) [0x00038] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x00516] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in <816110c02eb3417e8d54b6b156d9f556>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <3d628fd3ab3741f191fd8b2e89cd01c9>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x002fc] in <3d628fd3ab3741f191fd8b2e89cd01c9>:0 
Omnisharp: [WARNING] Failed to load project file '/home/julien/Unity/Projects/Sample/Assembly-CSharp.csproj'.
{"Event":"MsBuildProjectDiagnostics","Body":{"FileName":"/home/julien/Unity/Projects/Sample/Assembly-CSharp.csproj","Warnings":[],"Errors":[{"LogLevel":"Error","FileName":"/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets","Text":"The \"ResolveAssemblyReference\" task failed unexpectedly.\nSystem.TypeLoadException: Could not find method '.ctor' due to a type load error: Could not set up parent class, due to: Could not set up parent class, due to:  assembly:/home/julien/Unity/Hub/Editor/2020.3.25f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Object member:(null) assembly:/home/julien/Unity/Hub/Editor/2020.3.25f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll type:Attribute member:(null) assembly:/home/julien/Unity/Projects/Sample/Library/ScriptAssemblies/UnityEngine.TestRunner.dll type:TestRunCallbackAttribute member:(null)\n  at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesDataInternal(System.Reflection.ICustomAttributeProvider)\n  at System.MonoCustomAttrs.GetCustomAttributesDataBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) [0x00010] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 \n  at System.MonoCustomAttrs.GetCustomAttributesData (System.Reflection.ICustomAttributeProvider obj, System.Boolean inherit) [0x00011] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 \n  at System.Reflection.CustomAttributeData.GetCustomAttributes (System.Reflection.Assembly target) [0x00000] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 \n  at System.Reflection.RuntimeAssembly.GetCustomAttributesData () [0x00000] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 \n  at Microsoft.Build.Tasks.AssemblyInformation.GetFrameworkName () [0x00025] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.AssemblyInformation.get_FrameworkNameAttribute () [0x00028] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.AssemblyDependency.AssemblyMetadata..ctor (System.String path) [0x00019] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.AssemblyInformation+<>c.<GetAssemblyMetadata>b__21_0 (System.String p) [0x00000] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].GetOrAdd (TKey key, System.Func`2[T,TResult] valueFactory) [0x00034] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 \n  at Microsoft.Build.Tasks.AssemblyInformation.GetAssemblyMetadata (System.String path, System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue] assemblyMetadataCache, Microsoft.Build.Shared.AssemblyNameExtension[]& dependencies, System.String[]& scatterFiles, System.Runtime.Versioning.FrameworkName& frameworkName) [0x00006] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at (wrapper delegate-invoke) <Module>.invoke_void_string_ConcurrentDictionary`2<string, AssemblyMetadata>_AssemblyNameExtension[]&_string[]&_FrameworkName&(string,System.Collections.Concurrent.ConcurrentDictionary`2<string, Microsoft.Build.Tasks.AssemblyDependency.AssemblyMetadata>,Microsoft.Build.Shared.AssemblyNameExtension[]&,string[]&,System.Runtime.Versioning.FrameworkName&)\n  at Microsoft.Build.Tasks.SystemState.GetAssemblyMetadata (System.String path, System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue] assemblyMetadataCache, Microsoft.Build.Shared.AssemblyNameExtension[]& dependencies, System.String[]& scatterFiles, System.Runtime.Versioning.FrameworkName& frameworkName) [0x00010] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.ReferenceTable.GetUnifiedAssemblyMetadata (Microsoft.Build.Tasks.Reference reference, System.Collections.Generic.IEnumerable`1[Microsoft.Build.Tasks.UnifiedAssemblyName]& unifiedDependencies, System.String[]& scatterFiles) [0x00023] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.ReferenceTable.FindDependenciesAndScatterFiles (Microsoft.Build.Tasks.Reference reference, System.Collections.Generic.List`1[T] newEntries) [0x0003a] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.ReferenceTable.FindAssociatedFiles () [0x000ea] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure () [0x0000a] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure (System.Collections.Generic.IEnumerable`1[T] remappedAssembliesValue, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyFiles, Microsoft.Build.Framework.ITaskItem[] referenceAssemblyNames, System.Collections.Generic.List`1[T] exceptions) [0x00038] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute (Microsoft.Build.Shared.FileExists fileExists, Microsoft.Build.Shared.DirectoryExists directoryExists, Microsoft.Build.Tasks.GetDirectories getDirectories, Microsoft.Build.Tasks.GetAssemblyName getAssemblyName, Microsoft.Build.Tasks.GetAssemblyMetadata getAssemblyMetadata, Microsoft.Build.Shared.GetRegistrySubKeyNames getRegistrySubKeyNames, Microsoft.Build.Shared.GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, Microsoft.Build.Tasks.GetLastWriteTime getLastWriteTime, Microsoft.Build.Tasks.GetAssemblyRuntimeVersion getRuntimeVersion, Microsoft.Build.Shared.OpenBaseKey openBaseKey, Microsoft.Build.Tasks.GetAssemblyPathInGac getAssemblyPathInGac, Microsoft.Build.Tasks.IsWinMDFile isWinMDFile, Microsoft.Build.Tasks.ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [0x00516] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000] in <816110c02eb3417e8d54b6b156d9f556>:0 \n  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <3d628fd3ab3741f191fd8b2e89cd01c9>:0 \n  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x002fc] in <3d628fd3ab3741f191fd8b2e89cd01c9>:0 ","StartLine":2202,"StartColumn":5,"EndLine":0,"EndColumn":0}]},"Seq":88,"Type":"event"}
Omnisharp: [ERROR] Attempted to update project that is not loaded: /home/julien/Unity/Projects/Sample/Assembly-CSharp.csproj

Hi @Julien_HENRY

I did it

Trigger: EDITOR_OPEN
[Editor open] 10 file(s) submitted
File 'Metrics.cs' excluded: file is ignored in VCS
File 'InnerSimGeneralParametersContainer.cs' excluded: Could not create a relative path
File 'PlaygroundStepEngine.cs' excluded: Could not create a relative path
File 'PlaygroundSceneEntities.cs' excluded: Could not create a relative path
File 'NestedInteractorAnimatorOverride.cs' excluded: file is ignored in VCS
File 'HandAnimator.CustomPose.cs' excluded: file is ignored in VCS
File 'HandAnimator.PointerPose.cs' excluded: file is ignored in VCS
File 'ApplicationEntryPoint.cs' excluded: Could not create a relative path
File 'release.yml' excluded: file is not part of any module in IntelliJ's project structure
File 'GameplayButton.cs' excluded: file is ignored in VCS
0 entries removed from the store
Couldn't get a connected engine to check for update: Project is not bound to a SonarQube project

I don’t want to use SonarQube server or SonarCloud just the local rules here

Also would there be a possibility to add a local configuration file in project sonarlint.xml where all rules are defined?

This is definitely a different behavior than what I am observing. This should be caused by the layout of your project. In SonarLint we need to compute the relative path of the files compared to the project basedir. The issue is that project baseDir is not a really clear concept. Sometime is is the VCS root, or the location of the .sln file.

Would it be possible for you to create a simple reproducer. Like for example by keeping only project configuration/build files (.sln, .csproj, and the .cs file your are trying to analyze)?

For you information this is what I see on my side, after fixing the exception I had related unresolved dependencies:

And the layout of the project in the filesystem is:
image

Maybe you can spot an obvious difference with your situation?

I created something similar to what you have and still it didn’t worked

I also again got these logs

File 'Snake.cs' excluded: Could not create a relative path
Couldn't get a connected engine to check for update: Project is not bound to a SonarQube project

Do I have to set something in sonarlint settings?

I am not sure what I am missing here.

Do I have to set something in sonarlint settings?

No

Would you mind sharing your sample project with us?

Hi @rYuuk

I’m sorry but we are still not able to reproduce. The analysis works fine with your sample project. There should be something different in your setup that we are not understanding.
Could you please follow those steps:

  • ensure analysis + verbose logs are enabled in the SonarLint log tab
  • close the solution (or close Rider)
  • reopen Rider and open the solution (SonarLintTest.sln)
  • open the file Snake.cs in the editor
  • look at the SonarLint console and share the full content with me

I would expect logs like:

Couldn't get a connected engine to check for update: Project is not bound to a SonarQube project
Found plugin: sonar-ruby-plugin-1.8.3.2219.jar
Found plugin: sonarlint-omnisharp-plugin-1.0.1.40480.jar
Found plugin: sonar-kotlin-plugin-2.3.0.609.jar
Found plugin: sonar-html-plugin-3.4.0.2754.jar
Found plugin: sonar-php-plugin-3.21.1.8250.jar
Found plugin: sonar-python-plugin-3.6.0.8488.jar
Found plugin: sonar-javascript-plugin-8.4.0.16431.jar
Found plugin: sonar-java-plugin-7.4.0.27839.jar
Found plugin: sonar-secrets-plugin-1.1.0.36766.jar
Found plugin: sonar-cfamily-plugin-6.28.0.39490.jar
Trigger: EDITOR_OPEN
[Editor open] 1 file(s) submitted
Create : /home/julien/.config/JetBrains/Rider2021.2/sonarlint/plugins
Plugin cache: /home/julien/.config/JetBrains/Rider2021.2/sonarlint/plugins
Create : /home/julien/.config/JetBrains/Rider2021.2/sonarlint/plugins/_tmp
Load plugins
Plugin 'Ruby Code Quality and Security' is excluded because language 'Ruby' is not enabled. Skip loading it.
Plugin 'Kotlin Code Quality and Security' is excluded because language 'Kotlin' is not enabled. Skip loading it.
Plugin 'HTML Code Quality and Security' is excluded because none of languages 'HTML,JSP' are enabled. Skip loading it.
Plugin 'PHP Code Quality and Security' is excluded because language 'PHP' is not enabled. Skip loading it.
Plugin 'Python Code Quality and Security' is excluded because language 'Python' is not enabled. Skip loading it.
Plugin 'JavaScript/TypeScript Code Quality and Security' is excluded because none of languages 'JavaScript,TypeScript' are enabled. Skip loading it.
Plugin 'Java Code Quality and Security' is excluded because language 'Java' is not enabled. Skip loading it.
Plugin 'CFamily Code Quality and Security' is excluded because none of languages 'C,C++,Objective-C' are enabled. Skip loading it.
Load plugins (done) | time=60ms
Plugins:
  * C# Code Quality and Security (Omnisharp) 1.0.1.40480 (csharp)
  * Sonar Secrets Plugin for SonarQube 1.1.0.36766 (secrets)
Creating container for module with key=Module: 'rider.module'
0 entries removed from the store
Configuring analysis with org.sonarlint.intellij.rider.RiderAnalysisConfigurator
Analysing 'Snake.cs'...
Starting analysis with configuration:
[
  baseDir: /home/julien/tmp/SonarLintTest/SonarLintTest
  extraProperties: {sonar.cs.internal.dotnetCliExeLocation=/usr/lib64/dotnet/dotnet}
  moduleKey: Module: 'rider.module'
  excludedRules: []
  includedRules: []
  ruleParameters: {}
  inputFiles: [
    file:///home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs (UTF-8)
  ]
]

Start analysis
Index files
Language of file 'file:///home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs' is detected to be 'C#'
1 file indexed
Execute Sensor: OmniSharp
Starting OmniSharp...
Omnisharp: [DEBUG] Loaded OmniSharp.Cake, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.DotNetTest, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Host, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.MSBuild, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Roslyn, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Roslyn.CSharp, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Script, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [DEBUG] Loaded OmniSharp.Shared, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
Omnisharp: [INFORMATION] Starting OmniSharp on fedora 34.0 (x64)
Omnisharp: [INFORMATION] DotNetPath set to dotnet
Omnisharp: [DEBUG] .NET SDK requires MSBuild instances version 16.3.0 or higher
Omnisharp: [DEBUG] Can't use installed Mono because OmniSharp isn't running on it
Omnisharp: [INFORMATION] Located 1 MSBuild instance(s)
            1: StandAlone 16.11.0 - "/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin"
Omnisharp: [DEBUG] MSBuild instance StandAlone 16.11.0 scored at 1
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.dll' (name-only).
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Utilities.Core.dll' (name-only).
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Framework.dll' (name-only).
Omnisharp: [DEBUG] SUCCESS: Resolved to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.dll' (name-only).
Omnisharp: [INFORMATION] MSBUILD_EXE_PATH environment variable set to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
Omnisharp: [INFORMATION] Registered MSBuild instance: StandAlone 16.11.0 - "/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            MSBuildToolsPath = /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
            CscToolPath = /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=3.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll'.
[...]
Omnisharp: [DEBUG] Starting with OmniSharp options: {"RoslynExtensionsOptions":{"EnableDecompilationSupport":false,"EnableAnalyzersSupport":false,"EnableImportCompletion":false,"EnableAsyncCompletion":false,"DocumentAnalysisTimeoutMs":10000,"LocationPaths":null},"FormattingOptions":{"OrganizeImports":false,"EnableEditorConfigSupport":false,"NewLine":"\n","UseTabs":false,"TabSize":4,"IndentationSize":4,"SpacingAfterMethodDeclarationName":false,"SpaceWithinMethodDeclarationParenthesis":false,"SpaceBetweenEmptyMethodDeclarationParentheses":false,"SpaceAfterMethodCallName":false,"SpaceWithinMethodCallParentheses":false,"SpaceBetweenEmptyMethodCallParentheses":false,"SpaceAfterControlFlowStatementKeyword":true,"SpaceWithinExpressionParentheses":false,"SpaceWithinCastParentheses":false,"SpaceWithinOtherParentheses":false,"SpaceAfterCast":false,"SpacesIgnoreAroundVariableDeclaration":false,"SpaceBeforeOpenSquareBracket":false,"SpaceBetweenEmptySquareBrackets":false,"SpaceWithinSquareBrackets":false,"SpaceAfterColonInBaseTypeDeclaration":true,"SpaceAfterComma":true,"SpaceAfterDot":false,"SpaceAfterSemicolonsInForStatement":true,"SpaceBeforeColonInBaseTypeDeclaration":true,"SpaceBeforeComma":false,"SpaceBeforeDot":false,"SpaceBeforeSemicolonsInForStatement":false,"SpacingAroundBinaryOperator":"single","IndentBraces":false,"IndentBlock":true,"IndentSwitchSection":true,"IndentSwitchCaseSection":true,"IndentSwitchCaseSectionWhenBlock":true,"LabelPositioning":"oneLess","WrappingPreserveSingleLine":true,"WrappingKeepStatementsOnSingleLine":true,"NewLinesForBracesInTypes":true,"NewLinesForBracesInMethods":true,"NewLinesForBracesInProperties":true,"NewLinesForBracesInAccessors":true,"NewLinesForBracesInAnonymousMethods":true,"NewLinesForBracesInControlBlocks":true,"NewLinesForBracesInAnonymousTypes":true,"NewLinesForBracesInObjectCollectionArrayInitializers":true,"NewLinesForBracesInLambdaExpressionBody":true,"NewLineForElse":true,"NewLineForCatch":true,"NewLineForFinally":true,"NewLineForMembersInObjectInit":true,"NewLineForMembersInAnonymousTypes":true,"NewLineForClausesInQuery":true},"FileOptions":{"SystemExcludeSearchPatterns":["**/node_modules/**/*","**/bin/**/*","**/obj/**/*","**/.git/**/*"],"ExcludeSearchPatterns":[]},"RenameOptions":{"RenameOverloads":false,"RenameInStrings":false,"RenameInComments":false},"ImplementTypeOptions":{"InsertionBehavior":null,"PropertyGenerationBehavior":null},"Plugins":{"LocationPaths":null}}
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Workspaces.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.CSharp.Workspaces.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll'.
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
Omnisharp: [INFORMATION] Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
Omnisharp: [INFORMATION] Detecting Cake files in '/home/julien/tmp/SonarLintTest/SonarLintTest'.
Omnisharp: [INFORMATION] Could not find any Cake files
Omnisharp: [DEBUG] MSBuild environment: 
Mode: Standalone
RunningTests: False
RunningInVisualStudio: False
MSBuildToolsDirectory32: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
MSBuildToolsDirectory64: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
MSBuildSDKsPath: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Sdks
CurrentMSBuildConfigurationFile: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/MSBuild.exe.config
CurrentMSBuildExePath: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/MSBuild.exe
CurrentMSBuildToolsDirectory: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin
VisualStudioInstallRootDirectory: 
MSBuildExtensionsPath: /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin

Omnisharp: [DEBUG] 'MSBuildExtensionsPath' set to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild'
Omnisharp: [DEBUG] 'CscToolPath' set to '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Roslyn'
Omnisharp: [DEBUG] 'CscToolExe' set to 'csc.exe'
Omnisharp: [INFORMATION] Detecting projects in '/home/julien/tmp/SonarLintTest/SonarLintTest/SonarLintTest.sln'.
Omnisharp: [DEBUG] Parsing ProjectConfigurationPlatforms of '/home/julien/tmp/SonarLintTest/SonarLintTest/SonarLintTest.sln'.
Omnisharp: [INFORMATION] Queue project update for '/home/julien/tmp/SonarLintTest/SonarLintTest/Assembly-CSharp.csproj'
Omnisharp: [INFORMATION] Detecting CSX files in '/home/julien/tmp/SonarLintTest/SonarLintTest'.
Omnisharp: [INFORMATION] Could not find any CSX files
Omnisharp: [INFORMATION] Configuration finished.
Omnisharp: [INFORMATION] Omnisharp server running using Stdio at location '/home/julien/tmp/SonarLintTest/SonarLintTest' on host 15877.
OmniSharp successfully started
Waiting for solution/project configuration to be loaded...
Omnisharp: [INFORMATION] Loading project: /home/julien/tmp/SonarLintTest/SonarLintTest/Assembly-CSharp.csproj
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.resources, Version=15.1.0.0, Culture=fr-FR, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.resources, Version=15.1.0.0, Culture=fr, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.Tasks.Core.resources, Version=15.1.0.0, Culture=fr-FR, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.Build.Tasks.Core.resources, Version=15.1.0.0, Culture=fr, PublicKeyToken=b03f5f7f11d50a3a'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.resources.dll'.
Omnisharp: [INFORMATION] Successfully loaded project file '/home/julien/tmp/SonarLintTest/SonarLintTest/Assembly-CSharp.csproj'.
{"Event":"MsBuildProjectDiagnostics","Body":{"FileName":"/home/julien/tmp/SonarLintTest/SonarLintTest/Assembly-CSharp.csproj","Warnings":[],"Errors":[]},"Seq":87,"Type":"event"}
Omnisharp: [INFORMATION] Adding project '/home/julien/tmp/SonarLintTest/SonarLintTest/Assembly-CSharp.csproj'
Omnisharp: [INFORMATION] Update project: Assembly-CSharp
Omnisharp: [DEBUG] .editorconfig files were configured by the project Assembly-CSharp but will not be respected because the feature is switched off in OmniSharp. Enable .editorconfig support in OmniSharp to take advantage of them.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.ComponentModel.Composition/4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.ComponentModel.Composition/4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.IO.Compression/4.0.0.0__b77a5c561934e089/System.IO.Compression.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.IO.Compression/4.0.0.0__b77a5c561934e089/System.IO.Compression.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.IO.Compression.FileSystem/4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.IO.Compression.FileSystem/4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Net.Http/4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Net.Http/4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Numerics.Vectors/4.0.0.0__b03f5f7f11d50a3a/System.Numerics.Vectors.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Numerics.Vectors/4.0.0.0__b03f5f7f11d50a3a/System.Numerics.Vectors.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Transactions/4.0.0.0__b77a5c561934e089/System.Transactions.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Transactions/4.0.0.0__b77a5c561934e089/System.Transactions.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll' to 'Assembly-CSharp'.
Omnisharp: [DEBUG] Cache miss /home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Xml.Linq/4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
Omnisharp: [DEBUG] Adding reference '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/lib/mono/gac/System.Xml.Linq/4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll' to 'Assembly-CSharp'.
{"Event":"ProjectConfiguration","Body":{"ProjectId":"02b82ce7-bb27-3886-beb4-5c12457e13b7","SessionId":"-2088481256","OutputKind":2,"ProjectCapabilities":["CSharp","Managed","ReferencesFolder","LanguageService","RelativePathDerivedDefaultNamespace","AssemblyReferences","COMReferences","ProjectReferences","SharedProjectReferences","OutputGroups","AllTargetOutputGroups","VisualStudioWellKnownOutputGroups","SingleFileGenerators","DeclaredSourceItems","UserSourceItems","BuildWindowsDesktopTarget"],"TargetFrameworks":["v4.7.1"],"SdkVersion":"-873521827","References":["51d17f0bd2990e1e","13bbf2cbcdb96469","5faa84ffcc646d16","6001a9b860f7e43","4bca77302b767821","b42e3bf9c2caf9d","7a37191fa2429c0","4b3556ed143bb1a1","990c07b3a694f061","6f6cd086b29443f","d373f3c4566c70c6","6a5eaa177b0b8d54","add48a46678bd09d"],"FileExtensions":["-1257278712"],"FileCounts":[2]},"Seq":117,"Type":"event"}
Solution/project configuration loaded
Omnisharp: [DEBUG] ************ Request ************
{
  "Type": "request",
  "Seq": 1,
  "Command": "/sonarlint/config",
  "Arguments": {
    "activeRules": [
      {
        "ruleId": "S1854"
      },
      [...]
    ]
  }
}
Omnisharp: [DEBUG] ************  Response (29.9432ms) ************ 
{
  "Request_seq": 1,
  "Command": "/sonarlint/config",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": true,
  "Seq": 121,
  "Type": "response"
}
1 source file to be analyzed
Omnisharp: [DEBUG] ************ Request ************
{
  "Type": "request",
  "Seq": 2,
  "Command": "/updatebuffer",
  "Arguments": {
    "FileName": "/home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs",
    "Buffer": "using System.Collections;\r\nusing System.Collections.Generic;\r\nusing UnityEngine;\r\n\r\npublic class Snake : MonoBehaviour\r\n{\r\n    // Start is called before the first frame update\r\n    void Start()\r\n    {\r\n        \r\n    }\r\n\r\n    // Update is called once per frame\r\n    void Update()\r\n    {\r\n        // TODO Remove this\r\n    }\r\n}\r\n"
  }
}
Omnisharp: [DEBUG] Updating file /home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs with new text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Snake : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        // TODO Remove this
    }
}

Omnisharp: [DEBUG] ************  Response (21.1867ms) ************ 
{
  "Request_seq": 2,
  "Command": "/updatebuffer",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": true,
  "Seq": 124,
  "Type": "response"
}
Omnisharp: [DEBUG] ************ Request ************
{
  "Type": "request",
  "Seq": 3,
  "Command": "/sonarlint/codecheck",
  "Arguments": {
    "FileName": "/home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs"
  }
}
Omnisharp: [DEBUG] Attempting to resolve 'SonarAnalyzer.CSharp.resources, Version=8.26.0.0, Culture=fr-FR, PublicKeyToken=c5b62af9de6d7244'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/SonarAnalyzer.CSharp.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'SonarAnalyzer.CSharp.resources, Version=8.26.0.0, Culture=fr, PublicKeyToken=c5b62af9de6d7244'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/SonarAnalyzer.CSharp.resources.dll'.
Omnisharp: [INFORMATION] Solution initialized -> queue all documents for code analysis. Initial document count: 2.
Omnisharp: [DEBUG] Attempting to resolve 'SonarLint.OmniSharp.DotNet.Services.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/SonarLint.OmniSharp.DotNet.Services.XmlSerializers.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.resources, Version=3.11.0.0, Culture=fr-FR, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.resources.dll'.
Omnisharp: [DEBUG] Attempting to resolve 'Microsoft.CodeAnalysis.resources, Version=3.11.0.0, Culture=fr, PublicKeyToken=31bf3856ad364e35'
Omnisharp: [DEBUG] FAILURE: Could not locate '/home/julien/.local/share/JetBrains/Rider2021.2/sonarlint-intellij/omnisharp/linux/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.resources.dll'.
Omnisharp: [DEBUG] ************  Response (1386.1523ms) ************ 
{
  "Request_seq": 3,
  "Command": "/sonarlint/codecheck",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "QuickFixes": [
      {
        "AdditionalLocations": [],
        "LogLevel": "Warning",
        "Id": "S3903",
        "Tags": [],
        "FileName": "/home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs",
        "Line": 5,
        "Column": 14,
        "EndLine": 5,
        "EndColumn": 19,
        "Text": "Move 'Snake' into a named namespace.",
        "Projects": [
          "Assembly-CSharp"
        ]
      },
      {
        "AdditionalLocations": [],
        "LogLevel": "Warning",
        "Id": "S1186",
        "Tags": [],
        "FileName": "/home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs",
        "Line": 8,
        "Column": 10,
        "EndLine": 8,
        "EndColumn": 15,
        "Text": "Add a nested comment explaining why this method is empty, throw a 'NotSupportedException' or complete the implementation.",
        "Projects": [
          "Assembly-CSharp"
        ]
      },
      {
        "AdditionalLocations": [],
        "LogLevel": "Warning",
        "Id": "S1144",
        "Tags": [
          "Unnecessary"
        ],
        "FileName": "/home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs",
        "Line": 8,
        "Column": 5,
        "EndLine": 11,
        "EndColumn": 6,
        "Text": "Remove the unused private method 'Start'.",
        "Projects": [
          "Assembly-CSharp"
        ]
      },
      {
        "AdditionalLocations": [],
        "LogLevel": "Warning",
        "Id": "S1144",
        "Tags": [
          "Unnecessary"
        ],
        "FileName": "/home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs",
        "Line": 14,
        "Column": 5,
        "EndLine": 17,
        "EndColumn": 6,
        "Text": "Remove the unused private method 'Update'.",
        "Projects": [
          "Assembly-CSharp"
        ]
      },
      {
        "AdditionalLocations": [],
        "LogLevel": "Warning",
        "Id": "S1135",
        "Tags": [],
        "FileName": "/home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs",
        "Line": 16,
        "Column": 12,
        "EndLine": 16,
        "EndColumn": 16,
        "Text": "Complete the task associated to this 'TODO' comment.",
        "Projects": [
          "Assembly-CSharp"
        ]
      }
    ]
  },
  "Seq": 128,
  "Type": "response"
}
Initializing metadata of file file:///home/julien/tmp/SonarLintTest/SonarLintTest/Assets/Snake.cs
1/1 source file has been analyzed
Execute Sensor: Sonar Secrets Detection Sensor
Done in 3896ms

Processed 5 issues
Found 5 issues
{"Event":"ProjectDiagnosticStatus","Body":{"Type":"background","Status":0,"ProjectFilePath":"/home/julien/tmp/SonarLintTest/SonarLintTest/Assembly-CSharp.csproj"},"Seq":142,"Type":"event"}
{"Event":"ProjectDiagnosticStatus","Body":{"Type":"background","Status":1,"ProjectFilePath":"/home/julien/tmp/SonarLintTest/SonarLintTest/Assembly-CSharp.csproj"},"Seq":145,"Type":"event"}

Could it have something to do with where rider is installed on the pc? I see the location of rider.exe in
AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\212.4746.113\bin

Server started on 64120
Trigger: EDITOR_OPEN
[Editor open] 3 file(s) submitted
File 'sonarlint.xml' excluded: file is not part of any module in IntelliJ's project structure
File 'Snake.cs' excluded: Could not create a relative path
File 'codeStyleConfig.xml' excluded: file is not part of any module in IntelliJ's project structure
Couldn't get a connected engine to check for update: Project is not bound to a SonarQube project

I don’t think so.

The way we compute relative path is here. Basically, we are trying several strategies in a row, and in your case it seems none are working:

  1. Relative path to (IntelliJ) project basedir
  2. Relative path to module basedir (not applicable in Rider)
  3. Relative path to content root (should always work in Rider, because each file of the solution is a content root).
  4. Find first common ancestor between the file to analyze and the project basedir (should always work, except if the project basedir and the file to analyze are on different drives on Windows)

One thing you can try is to update to latest Rider version (2021.3) to see if this is maybe a bug on their side.
If that doesn’t work, I will prepare a special build of SonarLint that will log all values used in the computation of the relative path (project basedir, content roots, …).

One thing you can try is to update to latest Rider version (2021.3) to see if this is maybe a bug on their side.

Updating rider works, thanks a lot.

One last thing, would it be possible to add a sonarlint.xml configuration file which contains all the rules locally?

:hugs:

This is not supported in Rider at the moment. We have decided so far to implement the experience that feel the most “native” in each IDE, and for Rider, SonarLint settings are stored in the IDE settings (like native inspections).

I guess your need would be to share the rules configuration with your teammates right? Are they all working on Rider, or do you have a mix of Rider/Visual Studio/VSCode???

We are using Codacy for our CI pipeline which is using SonarQube. There you can either select rules on codacy website or it can get the rules from a configuration file in the project repository and for SonarC# it is sonarlint.xml.
So by keeping single rule file locally in the repo I can sync rules for linting in rider and in codacy for CI pipeline.

Hum, I don’t know how Codacy works, but if you are using SonarQube, you can use connected mode to bind your Rider project to the same project analyzed on SonarQube, and the rules configured on SonarQube (in the quality profile) will be applied in SonarLint.

We are not using SonarQube directly but instead Codacy uses SonarQube in docker. So I don’t any access to SonarQube or SonarCloud. Thats why I thought if we could just import rules configuration in SonarLint it will work for us.