Skip to content

PSUseDeclaredVarsMoreThanAssigments on $function:prompt #408

@vors

Description

@vors

Variable analyzes should know about the ability to set functions as a variable and about special type of functions like prompt.

Here is an example usage:
https://github.com/vors/ZLocation/blob/808da1369ddf31cd67427f92f5503c06e4e4ae0e/ZLocation/ZLocation.psm1#L56

$function:prompt = [ScriptBlock]::Create($newPrompt)

I getting this warning on v 1.2.0:

PSUseDeclaredVarsMoreThanAssigments 
Warning      
ZLocation.psm1 56    
The variable function:prompt' is assigned but never used.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions