PSScriptAnalyzer
PSScriptAnalyzer copied to clipboard
Download ScriptAnalyzer from PowerShellGallery
## PR Summary ## PR Checklist - [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission) - Use the present tense and imperative mood when describing your changes - [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission) -...
There is currently a rule that warns when I have assigned a variable but haven't called it (UseDeclaredVarsMoreThanAssignments), however, there doesn't appear to be a rule that warns me if...
## PR Summary Prior to this change, the documentation for the new rule, **AvoidUsingBrokenHashAlgorithms**, was not reflowed and had the same metadata description as **UseCmdletCorrectly**. To keep this document in...
### Steps to reproduce ```PowerShell Param ( [String]$SamAccountName = 'bob' ) Get-ADGroupMember 'group' | Get-ADUser | Where-Object { ($_.SamAccountName -ne $SamAccountName) } ```  ### Expected behavior The variable is...
**Summary of the new feature** While not technically an alias, `!` behaves like an alias to the `-not` operator. Even "about_Logical_Operators" only mentions it in passing as ["Same as `-not`"](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logical_operators?view=powershell-7.2#long-description)...
Note: this is meant to be a living artifact for discussing, and tracking the 2.0 milestone # PSSA 2.0 Roadmap PSScriptAnalyzer 2.0 is a major architecture of the PSScriptAnalyzer (PSSA)...
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...
Hi! We are using PSSA to analyze syntax errors in '.ps1' files with custom rules. It seems that a new PowerShell session is created when we invoke-ScriptAnalyzer with custom rules,...
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...
PSUseUsingScopeModifierInNewRunspaces has false positive when using -ArgumentList on Invoke-Command
Steps to reproduce ------------------ ``` # $sb = { Invoke-Command -Session $psSession -ArgumentList $path -ErrorAction Stop -ScriptBlock { Param ($Foo) return $Foo }} # Invoke-ScriptAnalyzer -ScriptDefinition [scriptblock]$sb | ft -a...