Skip to content
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

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

mavasani
Copy link
Contributor

@mavasani mavasani requested a review from a team as a code owner September 22, 2023 04:08
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 22, 2023
@@ -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,
Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops!

@mavasani
Copy link
Contributor Author

Tagging @0101

Copy link
Member

@dibarbet dibarbet left a 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)
Copy link
Member

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

Copy link
Contributor Author

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.

@mavasani mavasani merged commit bdd9c5b into dotnet:main Sep 22, 2023
24 checks passed
@ghost ghost added this to the Next milestone Sep 22, 2023
@mavasani mavasani deleted the FixDiagnosticKind branch September 22, 2023 06:30
@Cosifne Cosifne modified the milestones: Next, 17.8 P3 Sep 25, 2023
mavasani added a commit to mavasani/roslyn that referenced this pull request Sep 26, 2023
Address feedback from dotnet#70068 (comment) and move `AdditionalAnalyzers` to `InitializationOptions` for LSP pull diagnostics tests
mavasani added a commit to mavasani/roslyn that referenced this pull request Sep 26, 2023
Address feedback from dotnet#70068 (comment) and move `AdditionalAnalyzers` to `InitializationOptions` for LSP pull diagnostics tests
@mavasani mavasani mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing syntax diagnostics in VS
4 participants