From 549e0d269bccaa6b8d6b7d99bc69a857927a8237 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 11 Aug 2022 17:09:42 +0100 Subject: [PATCH 1/9] Changelog for 1.21.0 --- CHANGELOG.MD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index bbe2e241b..f50098798 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,55 @@ # CHANGELOG +## [1.21.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.21.0) - 2022-08-11 + +### New Rule + +- Add AvoidMultipleTypeAttributes rule (#1705) (thanks @hankyi95) +Add the AvoidSemicolonsAsLineTerminators rule to warn about lines ending with a semicolon. Fix (#824) (#1806) (thanks @tempora-mutantur) + +### Enhancements + +Also return suggestion to use PSCredential for AvoidUsingPlainTextForPassword rule (#1782) (by @bergmeister) + +### Fixes + +- Fix PSUseConsistentIndentation.PipelineIndentation.None to not remove code when the previous line ended with a pipe (#1746) (by @bergmeister) +- Skip OpenBrace check when preceded by Dot token (#1750) (by @bergmeister) +- Fix NRE (NullReferenceException) when custom rules omit optional properties in diagnostics (#1715) (by @rjmholt) + +### Build, Documenation and Maintenance + +- Set MaxDepth in JsonSerializerSettings for more secure handling of exceptional conditions in Newtonsoft.Json (#1824) (by @bergmeister) +- Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) +- Update minimum PowerShell version to 7.1.7 (#1769) (by @bergmeister) +- Add `.github/fabricbot.json` (#1812) +- Sync changes from docs repo (#1814) (by @sdwheeler) +- Fix name of PowerShell 5.1 test stage in CI (#1820) (by @bergmeister) +- CI: Retry test tasks in cas1e of failure to reduce sporadic failures (#1770) +- Upgrade from net452 to net462 for Windows PowerShell (#1789) +- Move issue template config into folder (#1804) (thanks @michaeltlombardi) +- Bump version from 1.20.0 to 1.21.0 (#1796) (by @bergmeister) +- Bump .NET SDK and SMA patch version (#1795) (by @bergmeister) +- Be sure not to clobber existing files when installing dotnet. (#1788) (by @JamesWTruher) +- Add link to issues chooser for reporting docs issues (#1794) (by @sdwheeler) +- Update README and delete docs that were migrated (#1790) (by @sdwheeler) +- Fix errors in ShouldProcess rule document (#1766) (thanks @masaru-iritani) +- Replicate changes from docs repo (#1781) (by @sdwheeler) +- Update Windows CI images as windows-2016 has been deprecated (#1784) (by @bergmeister) +- Use latest mac image rather than a specific version. (#1777) (by @JamesWTruher) +- Add docs migration notice & fix formatting (#1779) (by @sdwheeler) +- use compliant build environment for release build. (#1776) (by @JamesWTruher) +- Enable SBOM creation for script analyzer (#1762) (by @JamesWTruher) +- Fix links to work on GitHub (#1738) (by @andschwa) +- Update AvoidUsingWMICmdlet.md (#1737) (thanks @C0smin) +- Fix broken doc link in README (#1735) (thanks @AndrewRathbun) +- Add metadata to docs (#1731) (by @sdwheeler) +- Remove Ubuntu 16.04 from test matrix (#1733) (by @rjmholt) +- Use PowerShell1ES pool for official build (#1719) (by @JamesWTruher) +- Update cmdlet docs for 1.20.0 (#1726) (by @sdwheeler) +- Fixes #1720 - move rule docs and update tests (#1724) (by @sdwheeler) +- Update rule docs (#1711) (by @sdwheeler) + ## [1.20.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.20.0) - 2021-08-20 ### Fixes From 73896de74824486bd0186bda29b570491b105b5e Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 15 Aug 2022 19:21:05 +0100 Subject: [PATCH 2/9] update with last 3 commits --- CHANGELOG.MD | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f50098798..0fad1cb32 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -5,11 +5,13 @@ ### New Rule - Add AvoidMultipleTypeAttributes rule (#1705) (thanks @hankyi95) -Add the AvoidSemicolonsAsLineTerminators rule to warn about lines ending with a semicolon. Fix (#824) (#1806) (thanks @tempora-mutantur) +- Add the AvoidSemicolonsAsLineTerminators rule to warn about lines ending with a semicolon. Fix (#824) (#1806) (thanks @tempora-mutantur) +- Add AvoidUsingBrokenHashAlgorithms (#1787) (thanks @MJVL) ### Enhancements -Also return suggestion to use PSCredential for AvoidUsingPlainTextForPassword rule (#1782) (by @bergmeister) +- Also return suggestion to use PSCredential for AvoidUsingPlainTextForPassword rule (#1782) (by @bergmeister) +- Invoke-Formatter: Accept input from pipeline (#1763) (by @bergmeister) ### Fixes @@ -19,6 +21,7 @@ Also return suggestion to use PSCredential for AvoidUsingPlainTextForPassword ru ### Build, Documenation and Maintenance +- Tweak documentation for AvoidUsingBrokenHashAlgorithms (#1829) (thanks @michaeltlombardi) - Set MaxDepth in JsonSerializerSettings for more secure handling of exceptional conditions in Newtonsoft.Json (#1824) (by @bergmeister) - Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) - Update minimum PowerShell version to 7.1.7 (#1769) (by @bergmeister) From e7b7f1331c2517bfaba66c5e49f42c80d47a7d85 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 22 Aug 2022 17:53:56 +0100 Subject: [PATCH 3/9] add new PR that fixed minimum PowerShell version --- CHANGELOG.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 0fad1cb32..b677e20d5 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -24,7 +24,7 @@ - Tweak documentation for AvoidUsingBrokenHashAlgorithms (#1829) (thanks @michaeltlombardi) - Set MaxDepth in JsonSerializerSettings for more secure handling of exceptional conditions in Newtonsoft.Json (#1824) (by @bergmeister) - Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) -- Update minimum PowerShell version to 7.1.7 (#1769) (by @bergmeister) +- Fix minimum PowerShell version to be 7.0.11 instead of 7.1.7 (#1830) (by @bergmeister) - Add `.github/fabricbot.json` (#1812) - Sync changes from docs repo (#1814) (by @sdwheeler) - Fix name of PowerShell 5.1 test stage in CI (#1820) (by @bergmeister) From 0f1efe8528f3261311b1c210db4a5ce9574f3dcd Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 22 Aug 2022 23:04:29 +0100 Subject: [PATCH 4/9] Update CHANGELOG.MD --- CHANGELOG.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b677e20d5..1e20b12cc 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -24,6 +24,7 @@ - Tweak documentation for AvoidUsingBrokenHashAlgorithms (#1829) (thanks @michaeltlombardi) - Set MaxDepth in JsonSerializerSettings for more secure handling of exceptional conditions in Newtonsoft.Json (#1824) (by @bergmeister) - Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) +- Update AvoidMultipleTypeAttributes.md with example that has runtime error (#1831) (by @bergmeister) - Fix minimum PowerShell version to be 7.0.11 instead of 7.1.7 (#1830) (by @bergmeister) - Add `.github/fabricbot.json` (#1812) - Sync changes from docs repo (#1814) (by @sdwheeler) From b750364e46c9b82119a5c0a514e1197f0c561cc6 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Tue, 30 Aug 2022 23:13:57 +0100 Subject: [PATCH 5/9] Update CHANGELOG.MD --- CHANGELOG.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 1e20b12cc..aaf20ead9 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -24,6 +24,7 @@ - Tweak documentation for AvoidUsingBrokenHashAlgorithms (#1829) (thanks @michaeltlombardi) - Set MaxDepth in JsonSerializerSettings for more secure handling of exceptional conditions in Newtonsoft.Json (#1824) (by @bergmeister) - Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) +- Correct pipeline acceptance docs for Invoke-Formatter.md (#1833) (by @bergmeister) - Update AvoidMultipleTypeAttributes.md with example that has runtime error (#1831) (by @bergmeister) - Fix minimum PowerShell version to be 7.0.11 instead of 7.1.7 (#1830) (by @bergmeister) - Add `.github/fabricbot.json` (#1812) From e0f49643f8b6b27ad0607b2afc8ca41d302b4f31 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Wed, 31 Aug 2022 22:49:59 +0100 Subject: [PATCH 6/9] Update CHANGELOG.MD --- CHANGELOG.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index aaf20ead9..93bfb4223 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -25,6 +25,7 @@ - Set MaxDepth in JsonSerializerSettings for more secure handling of exceptional conditions in Newtonsoft.Json (#1824) (by @bergmeister) - Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) - Correct pipeline acceptance docs for Invoke-Formatter.md (#1833) (by @bergmeister) +- Sync remaining docs changes from Microsoft docs (#1835) (by @bergmeister) - Update AvoidMultipleTypeAttributes.md with example that has runtime error (#1831) (by @bergmeister) - Fix minimum PowerShell version to be 7.0.11 instead of 7.1.7 (#1830) (by @bergmeister) - Add `.github/fabricbot.json` (#1812) From 1efc0c69bde852c13d1cf492cb6582f7c9484da4 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Wed, 31 Aug 2022 22:55:31 +0100 Subject: [PATCH 7/9] Update CHANGELOG.MD --- CHANGELOG.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 93bfb4223..52d9dd081 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -26,6 +26,7 @@ - Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) - Correct pipeline acceptance docs for Invoke-Formatter.md (#1833) (by @bergmeister) - Sync remaining docs changes from Microsoft docs (#1835) (by @bergmeister) +- Reformat note block (#1837) (by @sdwheeler) - Update AvoidMultipleTypeAttributes.md with example that has runtime error (#1831) (by @bergmeister) - Fix minimum PowerShell version to be 7.0.11 instead of 7.1.7 (#1830) (by @bergmeister) - Add `.github/fabricbot.json` (#1812) From 5dd776962f992905d51edad550c098a70af7956e Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 24 Sep 2022 21:16:11 +0100 Subject: [PATCH 8/9] Update CHANGELOG.MD --- CHANGELOG.MD | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 52d9dd081..67b2a5707 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,6 +1,6 @@ # CHANGELOG -## [1.21.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.21.0) - 2022-08-11 +## [1.21.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.21.0) - 2022-09-26 ### New Rule @@ -12,10 +12,13 @@ - Also return suggestion to use PSCredential for AvoidUsingPlainTextForPassword rule (#1782) (by @bergmeister) - Invoke-Formatter: Accept input from pipeline (#1763) (by @bergmeister) +- Make messages of UseCorrectCasing more detailed (#1843) +- Exclude automatic variable FormatEnumerationLimit from analysis by PSAvoidGlobalVars and PSUseDeclaredVarsMoreThanAssignments (#1836) (by @bergmeister) ### Fixes - Fix PSUseConsistentIndentation.PipelineIndentation.None to not remove code when the previous line ended with a pipe (#1746) (by @bergmeister) +- Fix edge case of UseConsistentIndentation where child pipeline is on the same line as hashtable (#1838) (by @bergmeister) - Skip OpenBrace check when preceded by Dot token (#1750) (by @bergmeister) - Fix NRE (NullReferenceException) when custom rules omit optional properties in diagnostics (#1715) (by @rjmholt) @@ -26,6 +29,7 @@ - Use latest Newtonsoft.Json version for Windows PowerShell builds and not exclude it any more in Dependabot (#1825) (by @bergmeister) - Correct pipeline acceptance docs for Invoke-Formatter.md (#1833) (by @bergmeister) - Sync remaining docs changes from Microsoft docs (#1835) (by @bergmeister) +- (MAINT) Update URLs for site rebrand from docs.microsoft.com to learn.microsoft.com (#1844) (by @sdwheeler) - Reformat note block (#1837) (by @sdwheeler) - Update AvoidMultipleTypeAttributes.md with example that has runtime error (#1831) (by @bergmeister) - Fix minimum PowerShell version to be 7.0.11 instead of 7.1.7 (#1830) (by @bergmeister) From 8b5269ff5ed0421e5d65a4f57eb1e6ff21e0e3a6 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Tue, 27 Sep 2022 21:35:43 +0100 Subject: [PATCH 9/9] Update CHANGELOG.MD --- CHANGELOG.MD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 67b2a5707..4f82a95e0 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,6 +1,6 @@ # CHANGELOG -## [1.21.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.21.0) - 2022-09-26 +## [1.21.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.21.0) - 2022-09-27 ### New Rule @@ -14,6 +14,7 @@ - Invoke-Formatter: Accept input from pipeline (#1763) (by @bergmeister) - Make messages of UseCorrectCasing more detailed (#1843) - Exclude automatic variable FormatEnumerationLimit from analysis by PSAvoidGlobalVars and PSUseDeclaredVarsMoreThanAssignments (#1836) (by @bergmeister) +- PSAvoidUsingPositionalParameters: Do not warn on AZ CLI (#1846) (by @bergmeister) ### Fixes