mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Add test for SystemConsoleShouldBeAvoidedAnalyzer for when System.Console isn't used
This commit is contained in:
@@ -53,7 +53,8 @@ namespace CliFx.Analyzers
|
||||
return;
|
||||
|
||||
// Check if IConsole is available in scope as an alternative to System.Console
|
||||
var isConsoleInterfaceAvailable = context.Node
|
||||
var isConsoleInterfaceAvailable = context
|
||||
.Node
|
||||
.Ancestors()
|
||||
.OfType<MethodDeclarationSyntax>()
|
||||
.SelectMany(m => m.ParameterList.Parameters)
|
||||
|
||||
Reference in New Issue
Block a user