PowerShell-DevOps
PowerShell-DevOps copied to clipboard
Only variables in assignemt are proved
trafficstars
Hi Mathieu,
I think you picked the wrong AST type AssignmentStatementAst is for Assignments like $x = 5 NOT for variable names! So you only pick variables in assignments (first initial use / declaration) To check ALL Variable Names in the AST pick this AST class instead: System.Management.Automation.Language.ExpressionAst.VariableExpressionAst
Greets PowerPete