But if I try to bind a Project to a SonarQube Project I get this Error here in Log:
Omnisharp: [ERROR] Analysis of project (ProjectId, #23958e88-d084-4694-a0b0-d4bd5e79798d - ) failed, underlaying error: System.ArgumentException: Unrecognized active rules: S2758
Parameter name: activeRules
at SonarLint.OmniSharp.DotNet.Services.Rules.RulesToReportDiagnosticsConverter.Convert(ImmutableHashSet`1 activeRules, ImmutableHashSet`1 allRules)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintAnalysisConfigProvider.GetWithSonarLintRuleSeverities(Compilation compilation, IEnumerable`1 activeRules)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintAnalysisConfigProvider.Get(Compilation originalCompilation, AnalyzerOptions originalOptions)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintDiagnosticWorker.<AnalyzeDocument>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at OmniSharp.Roslyn.CSharp.Services.Diagnostics.CopiedCSharpDiagnosticWorkerWithAnalyzers.<AnalyzeProject>d__19.MoveNext()
And this results in “No Issues found” but the WebUI has Issues. Is there an Workaround to use the “Serverside/bound” Rules etc?
I am also facing this issue when using SonarLint in connected mode with a paid SonarCloud instance.
This works just fine in Visual Studio 2019, but not in Rider. When looking into the issue it appears the 2 rules were recently added to the SonarAnalyzer.CSharp nuget package.
I am running version 6.0.0.37696 of SonarLint in Rider (latest as of today) and the rules still fail to run. I tried ignoring the rules in using local project properties without any luck, then I tried setting the same properties in my SonarCloud instance as seen below which also didn’t work. The rules are still bound to my ruleset file for the project and run in SonarLint for Rider.
Omnisharp: [ERROR] Analysis of project (ProjectId, #2b7a45b1-0dc9-4343-a168-7609bd6ba1c8 - project.csproj) failed, underlaying error: System.ArgumentException: Unrecognized active rules: S3260,S3267
Parameter name: activeRules
at SonarLint.OmniSharp.DotNet.Services.Rules.RulesToReportDiagnosticsConverter.Convert(ImmutableHashSet`1 activeRules, ImmutableHashSet`1 allRules)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintAnalysisConfigProvider.GetWithSonarLintRuleSeverities(Compilation compilation, IEnumerable`1 activeRules)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintAnalysisConfigProvider.Get(Compilation originalCompilation, AnalyzerOptions originalOptions)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintDiagnosticWorker.<AnalyzeDocument>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at OmniSharp.Roslyn.CSharp.Services.Diagnostics.CopiedCSharpDiagnosticWorkerWithAnalyzers.<AnalyzeProject>d__19.MoveNext()
Yes, if I untick “Bind project to SonarQube / SonarCloud” and press “Analyze with Sonarlist” I immediately get issues found in the file. If I then tick it again the issue vanishes and no more issues are found.
The stack trace is the same as @reidj32 's from last month:
Omnisharp: [ERROR] Analysis of project (ProjectId, #fa80555d-86e8-42bf-8a20-d7971333dce8 - ) failed, underlaying error: System.ArgumentException: Unrecognized active rules: S3260,S3267
Parameter name: activeRules
at SonarLint.OmniSharp.DotNet.Services.Rules.RulesToReportDiagnosticsConverter.Convert(ImmutableHashSet`1 activeRules, ImmutableHashSet`1 allRules)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintAnalysisConfigProvider.GetWithSonarLintRuleSeverities(Compilation compilation, IEnumerable`1 activeRules)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintAnalysisConfigProvider.Get(Compilation originalCompilation, AnalyzerOptions originalOptions)
at SonarLint.OmniSharp.DotNet.Services.DiagnosticWorker.SonarLintDiagnosticWorker.<AnalyzeDocument>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at OmniSharp.Roslyn.CSharp.Services.Diagnostics.CopiedCSharpDiagnosticWorkerWithAnalyzers.<AnalyzeProject>d__19.MoveNext()
This is to inform you that we published yesterday a bug fix release on the JetBrains marketplace to solve this particular issue. Let me know if you still face some issues.