mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-08-02 18:17:30 +08:00

committed by
Patrik Svensson

parent
c2b25eea8a
commit
170901f584
@ -37,6 +37,12 @@ namespace Spectre.Console.Analyzer
|
||||
return;
|
||||
}
|
||||
|
||||
// if we aren't in a method then it might be too complex for us to handle.
|
||||
if (!invocationOperation.Syntax.Ancestors().OfType<MethodDeclarationSyntax>().Any())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HasFieldAnsiConsole(invocationOperation.Syntax) &&
|
||||
!HasParameterAnsiConsole(invocationOperation.Syntax))
|
||||
{
|
||||
|
Reference in New Issue
Block a user