From 2819e83dfb2c192672776a2ad0988ad7e6608c25 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 24 Aug 2019 19:08:27 +0100 Subject: [PATCH 1/5] Add changelog for 1.18.2 --- CHANGELOG.MD | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c58ed7cd8..44413fa73 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,39 @@ # CHANGELOG +## [1.18.2](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.2) - 2019-08-28 + +This release mainly brings fixes and enhancements that are especially useful when being consumed by PowerShellEditorServices. + +### Fixes + +- Compatibility Analysis + - Fix profile collection on non-Windows, add PS 7 profiles (#1260) (by @rjmholt) + +- 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) + +- Engine + - Work around runspacepool deadlock #1316 (by @rjmholt) + +### 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!) + +### 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!) + ## [1.18.1](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.1) - 2019-06-12 ### Fixes From 8eb4287526c21bccd985e0ac0aefe39e77fa3d35 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 24 Aug 2019 19:12:43 +0100 Subject: [PATCH 2/5] tweak (parenthesis) --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 44413fa73..8f45a8c9a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -16,7 +16,7 @@ This release mainly brings fixes and enhancements that are especially useful whe - Fix edge case when PipelineIndentationStyle is not set to NoIndentation (pipeline operator spanning only one line but PipelineAst spanning multiple lines) (#1261) (by @bergmeister) - Engine - - Work around runspacepool deadlock #1316 (by @rjmholt) + - Work around runspacepool deadlock (#1316) (by @rjmholt) ### Enhancements From aea8c7bb21ad03e4159e67f4b9951bd50f810f08 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 24 Aug 2019 19:16:35 +0100 Subject: [PATCH 3/5] add another detail --- CHANGELOG.MD | 1 + .../Rules/UseConsistentIndentation.tests.ps1 | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 8f45a8c9a..d8eabd817 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,6 +3,7 @@ ## [1.18.2](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.2) - 2019-08-28 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 diff --git a/Tests/Rules/UseConsistentIndentation.tests.ps1 b/Tests/Rules/UseConsistentIndentation.tests.ps1 index 2cce7dd7c..93faec469 100644 --- a/Tests/Rules/UseConsistentIndentation.tests.ps1 +++ b/Tests/Rules/UseConsistentIndentation.tests.ps1 @@ -158,6 +158,36 @@ foo | Invoke-FormatterAssertion $scriptDefinition $expected 3 $settings } + It "When a comment is in the middle of a multi-line statement with preceding pipeline and succeeding line continuation 2" { + $scriptDefinition = @' +foo ` +-bar | +baz +'@ + $expected = @' +foo ` + -bar | + baz +'@ + Invoke-FormatterAssertion $scriptDefinition $expected 2 $settings + } + + It "When a comment is in the middle of a multi-line statement with preceding pipeline and succeeding line continuation 3" { + $scriptDefinition = @' +foo ` +# comment +-bar | +baz +'@ + $expected = @' +foo ` + # comment + -bar | + baz +'@ + Invoke-FormatterAssertion $scriptDefinition $expected 3 $settings + } + It "Should find a violation if a pipleline element is not indented correctly" { $def = @' get-process | From 04c005c7744246b693e999041740958324c1ec7d Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Tue, 27 Aug 2019 22:37:09 +0100 Subject: [PATCH 4/5] Update CHANGELOG.MD with recent merges --- CHANGELOG.MD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index d8eabd817..f83bc0757 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -15,6 +15,7 @@ The benefit to the user will be some enhancements and fixes in the formatter, es - 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 - Work around runspacepool deadlock (#1316) (by @rjmholt) @@ -28,6 +29,7 @@ The benefit to the user will be some enhancements and fixes in the formatter, es - 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 @@ -35,6 +37,10 @@ The benefit to the user will be some enhancements and fixes in the formatter, es - 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 + +- Fix Ubuntu Appveyor build (#1320) (by @bergmeister, thanks @JamesWTruher for the initial investigation) + ## [1.18.1](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.1) - 2019-06-12 ### Fixes From 7df6705b885d7daa8d80f4f4e3d6acbf74c9262e Mon Sep 17 00:00:00 2001 From: "Christoph Bergmeister [MVP]" Date: Sun, 1 Sep 2019 16:35:30 +0100 Subject: [PATCH 5/5] Update CHANGELOG.MD --- CHANGELOG.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f83bc0757..27af85abd 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -39,6 +39,7 @@ The benefit to the user will be some enhancements and fixes in the formatter, es ### 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) ## [1.18.1](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.1) - 2019-06-12