PSScriptAnalyzer v1.18.2
This release mainly brings fixes and enhancements that are especially useful when being consumed by PowerShellEditorServices.
The benefit to the user will be some enhancements and fixes in the formatter, especially around multiline commands. In addition to that, error messages emitted when using invalid syntax in the setting file are now much more meaningful and actionable.
Fixes
-
Compatibility Analysis
-
Formatter
- Fix PSCloseBrace rule to not wrongly flag closing brace of one-line hashtable, which lead to incorrect formatting (#1309) (by @bergmeister)
- PipelineIndentationStyle (when not being set to NoIndentation)
- PipelineIndentationStyle: Fix edge case where pipeline was incorrectly detected to span multiple lines due to backticks in the command leading up to the pipeline (#1312) (by @bergmeister)
- Fix edge case when PipelineIndentationStyle is not set to NoIndentation (pipeline operator spanning only one line but PipelineAst spanning multiple lines) (#1261) (by @bergmeister)
- Allow formatter to optionally correct aliases (#1277) (by @bergmeister)
-
Engine
Enhancements
- Formatter
- Fix Indentation of multiline command with backticks after comment line (#1318) (by @bergmeister)
- Code Analysis:
- Enhance UseDeclaredVarsMoreThanAssignments to detect also take into account the usage of Get-Variable with an array of variables and usage of named - parameter -Name (#1310) (by @bergmeister)
- Settings files
- Actionable errors from incorrect settings files (#1263) (thanks @travis-c-lagrone!)
- Update engine resource string 'WrongKeyHashTable' to include all valid settings hashtable keys (#1273) (thanks @travis-c-lagrone!)
- Add icon and add reference in readme and manifest (#1291) (by @bergmeister, thanks @adilio for creating the logo!)
Documentation
- Update readme with changes to default branch being master now (#1265) (by @bergmeister)
- UseApprovedVerbs.md: Improving Documentation (#1294) (Thanks @Banner-Keith!)
- Update documentation for parameter "Settings" of command "Invoke-ScriptAnalyzer" to include the key "RecurseCustomRulesPath" - (#1272) (thanks @travis-c-lagrone!)
Build
- Don't sign the compatability collector catalog so that PSScriptAnalyzer can ship with a catalog file again (#1328) (by @JamesWTruher)
- Fix Ubuntu Appveyor build (#1320) (by @bergmeister, thanks @JamesWTruher for the initial investigation)