-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PullDiagnosticCategories to DiagnosticKind mapping in DocumentPullDiagnosticHandler #70068
Conversation
…lDiagnosticHandler Fixes dotnet/fsharp#15972
@@ -82,7 +82,7 @@ protected override DiagnosticTag[] ConvertTags(DiagnosticData diagnosticData) | |||
{ | |||
PullDiagnosticCategories.DocumentCompilerSyntax => DiagnosticKind.CompilerSyntax, | |||
PullDiagnosticCategories.DocumentCompilerSemantic => DiagnosticKind.CompilerSemantic, | |||
PullDiagnosticCategories.DocumentAnalyzerSyntax => DiagnosticKind.AnalyzerSemantic, | |||
PullDiagnosticCategories.DocumentAnalyzerSyntax => DiagnosticKind.AnalyzerSyntax, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only product change in the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops!
Tagging @0101 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved assuming the test method is adjusted
@@ -302,20 +302,20 @@ protected static LSP.TextEdit GenerateTextEdit(string newText, int startLine, in | |||
private protected static CodeActionResolveData CreateCodeActionResolveData(string uniqueIdentifier, LSP.Location location, IEnumerable<string>? customTags = null) | |||
=> new(uniqueIdentifier, customTags.ToImmutableArrayOrEmpty(), location.Range, CreateTextDocumentIdentifier(location.Uri)); | |||
|
|||
private protected Task<TestLspServer> CreateTestLspServerAsync(string markup, bool mutatingLspWorkspace, LSP.ClientCapabilities clientCapabilities, bool callInitialized = true) | |||
=> CreateTestLspServerAsync(new string[] { markup }, LanguageNames.CSharp, mutatingLspWorkspace, new InitializationOptions { ClientCapabilities = clientCapabilities, CallInitialized = callInitialized }); | |||
private protected Task<TestLspServer> CreateTestLspServerAsync(string markup, bool mutatingLspWorkspace, LSP.ClientCapabilities clientCapabilities, bool callInitialized = true, IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should put additionalAnalyzers
in initializationOptions
- that type was created because we kept adding more and more optional params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dibarbet - sorry I had enabled auto-merge for the PR. Let me address this in a follow-up PR.
Address feedback from dotnet#70068 (comment) and move `AdditionalAnalyzers` to `InitializationOptions` for LSP pull diagnostics tests
Address feedback from dotnet#70068 (comment) and move `AdditionalAnalyzers` to `InitializationOptions` for LSP pull diagnostics tests
Fixes dotnet/fsharp#15972