Skip to content

PSUseDeclaredVarsMoreThanAssigments on $function:prompt #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vors opened this issue Dec 17, 2015 · 1 comment
Closed

PSUseDeclaredVarsMoreThanAssigments on $function:prompt #408

vors opened this issue Dec 17, 2015 · 1 comment
Assignees
Milestone

Comments

@vors
Copy link

vors commented Dec 17, 2015

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.
@quoctruong
Copy link

Thanks for the report. This is fixed with #424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants