Skip to content

Commit e148710

Browse files
committed
Fix
1 parent 2c5f4d7 commit e148710

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/Features/Core/Portable/Options/EditorConfig/EditorConfigFileGenerator.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,17 @@ public static string Generate(
4040

4141
foreach ((var feature, var options) in groupedOptions)
4242
{
43-
if (options is [var preferencesOption] && preferencesOption == NamingStyleOptions.NamingPreferences)
44-
{
45-
if (configOptions.TryGetOption(new OptionKey2(preferencesOption, language), out NamingStylePreferences namingStylePreferences))
46-
{
47-
namingStylePreferences.AppendToEditorConfig(language, editorconfig);
48-
}
49-
}
50-
else
43+
if (!options.Contains(NamingStyleOptions.NamingPreferences))
5144
{
5245
AppendOptionsToEditorConfig(configOptions, feature, options, language, editorconfig);
5346
}
5447
}
5548

49+
if (configOptions.TryGetOption(new OptionKey2(NamingStyleOptions.NamingPreferences, language), out NamingStylePreferences namingStylePreferences))
50+
{
51+
namingStylePreferences.AppendToEditorConfig(language, editorconfig);
52+
}
53+
5654
return editorconfig.ToString();
5755
}
5856

0 commit comments

Comments
 (0)