Skip to content

Commit 77c1774

Browse files
authored
Merge pull request #62939 from Youssef1313/patch-31
Remove prefer system hash code from EditorConfig UI
2 parents c18a66e + 56a00dd commit 77c1774

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/VisualStudio/CSharp/Test/EditorConfigSettings/DataProvider/DataProviderTests.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,15 @@ public void TestGettingCodeStyleSettingProviderWorkspaceServiceAsync()
112112
var model = new TestViewModel();
113113
settingsProvider.RegisterViewModel(model);
114114
var dataSnapShot = settingsProvider.GetCurrentDataSnapshot();
115-
// We need to substract as a UI for arbitrary strings for:
116-
//
115+
116+
// We need to substract for string options that are not yet supported.
117117
// CodeStyleOptions2.OperatorPlacementWhenWrapping
118118
// CodeStyleOptions2.FileHeaderTemplate
119+
// CodeStyleOptions2.RemoveUnnecessarySuppressionExclusions
120+
//
121+
// We also subtract for this not-yet supported option, tracked by https://github.com/dotnet/roslyn/issues/62937
119122
// CodeStyleOptions2.ForEachExplicitCastInSource
120-
var optionsCount = CodeStyleOptions2.AllOptions.Where(x => x.StorageLocations.Any(y => y is IEditorConfigStorageLocation2)).Count() - 3;
123+
var optionsCount = CodeStyleOptions2.AllOptions.Where(x => x.StorageLocations.Any(y => y is IEditorConfigStorageLocation2)).Count() - 4;
121124
Assert.Equal(optionsCount, dataSnapShot.Length);
122125
}
123126

src/VisualStudio/Core/Def/EditorConfigSettings/DataProvider/CodeStyle/CommonCodeStyleSettingsProvider.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ private IEnumerable<CodeStyleSetting> GetCodeBlockCodeStyleOptions(AnalyzerConfi
132132
description: ServicesVSResources.analyzer_Prefer_auto_properties,
133133
editorConfigOptions: options,
134134
visualStudioOptions: visualStudioOptions, updater: updater, fileName: FileName);
135-
yield return CodeStyleSetting.Create(option: CodeStyleOptions2.PreferSystemHashCode,
136-
description: ServicesVSResources.Prefer_System_HashCode_in_GetHashCode,
137-
editorConfigOptions: options,
138-
visualStudioOptions: visualStudioOptions, updater: updater, fileName: FileName);
139135
}
140136

141137
private IEnumerable<CodeStyleSetting> GetExpressionCodeStyleOptions(AnalyzerConfigOptions options, OptionSet visualStudioOptions, OptionUpdater updater)

0 commit comments

Comments
 (0)