Skip to content

Unreliable Function Declaration Detection #399

@Kapparina

Description

@Kapparina

Description

Detection of function definitions is unreliable. Functions usages within a given file do not appear to raise errors if the function used doesn't exist either in the file in question or via an import.

Reproduction

  1. Create a PowerShell script file (.ps1) (File A).
  2. Use a made-up function (e.g. "Do-Thing").
  3. Note the lack of errors or warnings.
  4. Write an actual function in another .ps1 file (File B).
  5. Import the script within File A.
  6. Use the new function in File A.
  7. Attempt to view usages or go to the definition of the imported function.
  8. Observe failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions