未验证 提交 5cb31084 编写于 作者: M msftbot[bot] 提交者: GitHub

Merge pull request #42245 from mavasani/FixEditorConfigParse

Ensure that all the NamingStyles applicable symbol kinds have an edit…
......@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles;
using Roslyn.Test.Utilities;
......@@ -473,5 +474,16 @@ public static void TestPrefixParse()
Assert.Equal("", namingStyle.WordSeparator);
Assert.Equal(Capitalization.PascalCase, namingStyle.CapitalizationScheme);
}
[Fact]
public static void TestEditorConfigParseForApplicableSymbolKinds()
{
var symbolSpecifications = CreateDefaultSymbolSpecification();
foreach (var applicableSymbolKind in symbolSpecifications.ApplicableSymbolKindList)
{
var editorConfigString = EditorConfigNamingStyleParser.ToEditorConfigString(ImmutableArray.Create(applicableSymbolKind));
Assert.True(!string.IsNullOrEmpty(editorConfigString));
}
}
}
}
......@@ -333,6 +333,15 @@ private static string ToEditorConfigString(this SymbolKindOrTypeKind symbol)
case TypeKind.Delegate:
return "delegate";
case TypeKind.Module:
return "module";
case TypeKind.Pointer:
return "pointer";
case TypeKind.TypeParameter:
return "type_parameter";
case null:
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册