From d1857851fb2708f42866c34b8e50ea461932e1f8 Mon Sep 17 00:00:00 2001 From: David Wengier Date: Mon, 9 Sep 2024 14:19:52 +1000 Subject: [PATCH] PR Feedback --- .editorconfig | 1 + .../Cohost/CohostWorkspaceSpellCheckEndpoint.cs | 4 +--- .../PooledObjects/PooledHashSet`1.cs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index d640cd418c..3b58df10fa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -38,6 +38,7 @@ dotnet_separate_import_directive_groups = false # IDE0005 - Remove unnecessary imports dotnet_diagnostic.IDE0005.severity = warning + # IDE0052 - Private member can be removed dotnet_diagnostic.IDE0052.severity = warning diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostWorkspaceSpellCheckEndpoint.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostWorkspaceSpellCheckEndpoint.cs index 70151fead8..7f447ab561 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostWorkspaceSpellCheckEndpoint.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostWorkspaceSpellCheckEndpoint.cs @@ -14,10 +14,8 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost; [Shared] [CohostEndpoint(VSInternalMethods.WorkspaceSpellCheckableRangesName)] [ExportCohostStatelessLspService(typeof(CohostWorkspaceSpellCheckEndpoint))] -[method: ImportingConstructor] #pragma warning restore RS0030 // Do not use banned APIs -internal sealed class CohostWorkspaceSpellCheckEndpoint() - : AbstractRazorCohostRequestHandler +internal sealed class CohostWorkspaceSpellCheckEndpoint : AbstractRazorCohostRequestHandler { protected override bool MutatesSolutionState => false; diff --git a/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/PooledObjects/PooledHashSet`1.cs b/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/PooledObjects/PooledHashSet`1.cs index 5ea88903ca..f976a5b58f 100644 --- a/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/PooledObjects/PooledHashSet`1.cs +++ b/src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/PooledObjects/PooledHashSet`1.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Razor.PooledObjects; internal ref struct PooledHashSet { private readonly ObjectPool> _pool; -#pragma warning disable IDE0052 +#pragma warning disable IDE0052 // Used in NET only code below. Called API doesn't exist on framework. private readonly int? _capacity; #pragma warning restore IDE0052 private HashSet? _set;