PSScriptAnalyzer 1.19.1 Released

1.19.1 version of PSScriptAnalyzer fixes some of the user-reported bugs and introduces a new rule - AvoidUsingDoubleQuotesForConstantString.

Recently, Microsoft announced PSScriptAnalyzer 1.19.1, which is now available on the PowerShell Gallery.
This update fixes some of the user-reported bugs and introduces a new rule. The new rule, which is disabled by default, is meant for avoiding using double quotes for constant strings.
To install this latest version of the module, you just need to open any PowerShell console and run: Install-Module PSScriptAnalyzer -Force -Repository PSGallery
The new rule 'AvoidUsingDoubleQuotesForConstantString' states that when the value of a string is constant, then single quotes should be used to express the constant nature of the string.
This makes the intent clearer that the string is a constant and makes it easier to use some special characters like $ within that string expression without the need to escape them. There are exceptions to it when double quoted strings are more readable though.
The new release fixes the bug that caused incorrect formatting in hashtables in the non-default setting PipelineIndentationStyle.None. It also fixes ArgumentException when the same variable name is used in 2 different sessions.
Bugs with UseConsistentWhitespace have also been fixed. Other fixes include issue when CommandInfoParameters property throws due to runspace affinity problem of PowerShell engine and token check with new lines.
The team said that they are currently working on a major rearchitecture of PSScriptAnalyzer, dubbed PSScriptAnalyzer 2.0, whose previews will be available in fall 2020.

Next Recommended Reading Another Update To Opera 19 Released