PowerShell / PSScriptAnalyzer

Download ScriptAnalyzer from PowerShellGallery
https://www.powershellgallery.com/packages/PSScriptAnalyzer/
MIT License
1.87k stars 378 forks source link

Fulfilling mandatory parameters using a pipe results in a warning #71

Closed TravisEz13 closed 9 years ago

TravisEz13 commented 9 years ago

Repro

Clone https://github.com/TravisEz13/PSScriptAnalyzerExamples.git open the repo in powershell Invoke-ScriptAnalyzer .\pipeExample.ps1

Expected

no errors

Actual

Rule Name                           Severity   File Name  Line  Message
---------                           --------   ---------  ----  -------
PSUseCmdletCorrectly                Warning    pipeExampl 2     Cmdlet 'write-verbose' may be used incorrectly. Please
                                               e.ps1            check that all mandatory parameters are supplied.
raghushantha commented 9 years ago

We do not support pipeline in the current set of rules. We need a generic plan for all of the rules. moving 1506

quoctruong commented 9 years ago

Fix with https://github.com/PowerShell/PSScriptAnalyzer/pull/240