PSScriptAnalyzer
PSScriptAnalyzer copied to clipboard
Download ScriptAnalyzer from PowerShellGallery
What aliases should we put on the white-list? This is a open thread for discussion.
The following code makes PSScriptAnalyzer report AvoidDefaultValueForMandatoryParameter. For one parameter set, the parameter is optional, so having a default value may be desired and should not throw a warning. ```PowerShell...
I'm getting a rule violation when we force Write-Verbose to have output like this: ```PowerShell Write-Verbose -Verbose "My Message" ``` Steps to reproduce ------------------ ```PowerShell Invoke-ScriptAnalyzer -ScriptDefinition ' Write-Verbose -Verbose...
System Details Output ``` ### VSCode version: 1.36.1 2213894ea0415ee8c85c5eea0d0ff81ecc191529 x64 ### VSCode extensions: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] ### PSES version: ### PowerShell version: Name Value ---- ----- PSVersion...
Before submitting a bug report: - Make sure you are able to repro it on the latest released version - Perform a quick search for existing issues to check if...
- ✅ Make sure you are able to repro it on the latest released version - ✅ Perform a quick search for existing issues to check if this bug has...
Basically, it gets fixed if I have: ```PowerShell } else { ``` But it doesn't get fixed if I have: ```PowerShell } else { ``` And I would really like...
One thing i would like to see is rules that check case of reserved powershell words like function, if, switch, class, etc. A setting should be available to enforce all...
from document file /RuleDocumentation/AvoidTrailingWhitespace.md: > Lines should not end with whitespace characters. This can cause problems with the line-continuation backtick, and also clutters up future commits to source control. The...
Currently, PSAvoidTrailingWhitespace checks all lines for trailing whitespace, even when that line is effectively empty and the "trailing" whitespace is actually *leading* whitespace for the current indentation level. If the...