Improve tests

This commit is contained in:
Tyrrrz
2020-10-23 21:18:57 +03:00
parent b120138de3
commit 14ad9d5738
6 changed files with 100 additions and 22 deletions

View File

@@ -275,11 +275,8 @@ namespace CliFx.Analyzers
private static void CheckCommandType(SymbolAnalysisContext context)
{
// Named type: MyCommand
if (!(context.Symbol is INamedTypeSymbol namedTypeSymbol))
return;
// Only classes
if (namedTypeSymbol.TypeKind != TypeKind.Class)
if (!(context.Symbol is INamedTypeSymbol namedTypeSymbol) ||
namedTypeSymbol.TypeKind != TypeKind.Class)
return;
// Implements ICommand?