Skip to content

Commit 4330c47

Browse files
committed
Map dotnet_separate_import_directive_groups=false to OptionSetting.Allow
Roslyn does not remove blank lines when dotnet_separate_import_directive_groups is false.
1 parent 5665492 commit 4330c47

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/Settings/SettingsCSharp8UnitTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public async Task VerifyEditorConfigSettingsAreReadCorrectlyAsync()
6666

6767
Assert.NotNull(styleCopSettings.OrderingRules);
6868
Assert.Equal(UsingDirectivesPlacement.OutsideNamespace, styleCopSettings.OrderingRules.UsingDirectivesPlacement);
69-
Assert.Equal(OptionSetting.Omit, styleCopSettings.OrderingRules.BlankLinesBetweenUsingGroups);
69+
Assert.Equal(OptionSetting.Allow, styleCopSettings.OrderingRules.BlankLinesBetweenUsingGroups);
7070
}
7171

7272
[Theory]

StyleCop.Analyzers/StyleCop.Analyzers/Settings/ObjectModel/OrderingSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected internal OrderingSettings(JsonObject orderingSettingsObject, AnalyzerC
105105
blankLinesBetweenUsingGroups ??= AnalyzerConfigHelper.TryGetBooleanValue(analyzerConfigOptions, "dotnet_separate_import_directive_groups") switch
106106
{
107107
true => OptionSetting.Require,
108-
false => OptionSetting.Omit,
108+
false => OptionSetting.Allow,
109109
_ => null,
110110
};
111111

0 commit comments

Comments
 (0)