PSScriptAnalyzer
PSScriptAnalyzer copied to clipboard
Download ScriptAnalyzer from PowerShellGallery
Add lowercase keyword (and operator) enforcement as a separate rule. I was thinking about adding a check for the correct case of [Types] and [Attribute()]s, but I think _that_ should...
I have a script parameter that holds a path to the encrypted credential file named `$CredentialFile` for which I get the warning: _Parameter '$CredentialFile' should use SecureString, otherwise this will...
**Summary of the new feature** Incorrect case of language keywords should result in a PSUseCorrectCasing rule violation. A list of keywords can be obtained by reflection: ```powershell [ref].Assembly.GetType('System.Management.Automation.Language.Tokenizer'). GetDeclaredField('_keywordText'). ForEach{...
Expected behavior ----------------- ```none Get-ChildItem nosuchitem -ErrorAction SilentlyContinue ``` Actual behavior --------------- ```none Get-ChildItem nosuchitem -ErrorAction silentlycontinue ```
Steps to reproduce ------------------ I have a bunch of custom rules written in PowerShell. For some of the rules I populate `RuleSuppressionId` in the diagnostic record, so that I can...
Steps to reproduce ------------------ ```PowerShell Write-Output "Test" catch { Continue } ``` save it as a file, then run Invoke-ScriptAnalyzer against it. Expected behavior ----------------- An error should be displayed,...
**Summary of the new feature** See: [`#15756` Unquoted numbers with two or more dots should cast to a `[version]` rather than `$Null`](https://github.com/PowerShell/PowerShell/issues/15756) When an unquoted number contains two or more...
### Prerequisites - [X] I have written a descriptive issue title. - [X] I have searched all [issues](https://github.com/PowerShell/vscode-powershell/issues?q=is%3Aissue) to ensure it has not already been reported. ### Summary I realize...
### System Details System Details Output ``` ### VSCode version: 1.51.1 e5a624b788d92b8d34d1392e4c4d9789406efe8f x64 ### VSCode extensions: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] ### PSES version: 2.2.0.0 ### PowerShell...
### System Details System Details Output ``` ### VSCode version: 1.51.1 e5a624b788d92b8d34d1392e4c4d9789406efe8f x64 ### VSCode extensions: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] ### PSES version: 2.2.0.0 ### PowerShell...