Skip to content

Only variables in assignemt are proved #5

@Kriegel

Description

@Kriegel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions