PowerShell-DevOps icon indicating copy to clipboard operation
PowerShell-DevOps copied to clipboard

Only variables in assignemt are proved

Open Kriegel opened this issue 7 years ago • 0 comments
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

Kriegel avatar Feb 17 '18 08:02 Kriegel