PSScriptAnalyzer v1.22.0
Minimum required version when using PowerShell 7 is now 7.2.11.
New Rule
- Add AvoidUsingAllowUnencryptedAuthentication by Michael Van Leeuwen (@MJVL) in #1857
- Add the AvoidExclaimOperator rule to warn about the use of the ! negation operator. Fixes #1826 by Liam Peters (@liamjpeters) in #1922
Enhancements
- Enable suppression of PSAvoidAssignmentToAutomaticVariable for specific variable or parameter by Frode Flaten (@fflaten) in #1896
- Upgrade to use .NET 6 since PowerShell 7.0 is now out out of support by Christoph Bergmeister (@bergmeister) in #1873
- Convert UseSingularNouns to configurable rule and add Windows to allowlist by Michael Van Leeuwen (@MJVL) in #1858
- Add ErrorView to SpecialVars.cs by ewisniew0 in #1865
- Allow suppression of PSUseSingularNouns for specific function by Frode Flaten (@fflaten) in #1903
- Adding ToString() methods to [CorrectionExtent] and [DiagnosticRecord] by James Brundage (@StartAutomating) in #1946
- Add PSNativeCommandUseErrorActionPreference preference variable by Eli Arbel (@aelij) in #1954
- AvoidUsingPositionalParameter: Check if command has parameters to avoid having az in default CommandAllowList by Christoph Bergmeister (@bergmeister) in #1850
- PSReviewUnusedParameter: Add CommandsToTraverse option by Friedrich Weinmann (@FriedrichWeinmann) in #1921
Fixes
- Prevent NullReferenceException for null analysis type. by Hubert Bukowski (@hubuk) in #1949
Build & Test, Documentation and Maintenance
- UseApprovedVerbs.md: Backport minor change of PR 104 in PowerShell-Docs-Modules by Christoph Bergmeister (@bergmeister) in #1849
- Improve Pester bootstrap logic for CI by Christoph Bergmeister (@bergmeister) in #1853
- Bump .NET SDK from 3.1.419 to 3.1.424 by Christoph Bergmeister (@bergmeister) in #1852
- AvoidLongLines: Make internal function DiagnosticSeverity private by Christoph Bergmeister (@bergmeister) in #1851
- SupportsShouldProcess.md: Fix Typo - MicrosoftDocs backport of PR 121 there by Sean Wheeler (@sdwheeler) in #1869
- Minor test fix for UseCorrectCasing rule by Ryan Yates (@kilasuit) in #1885
- Make Invoke-Formatter test case assertion fail in case of incorrect casing by Oleksandr Redko (@alexandear) in #1888
- Fix
AvoidUsingDoubleQuotesForConstantStringinformation in overview README by Mikey Lombardi (He/Him) (@michaeltlombardi) in #1883 - Update dependabot reviewers to remove Rob by Frode Flaten (@fflaten) in #1897
- Fix typo in AvoidUsingPlainTextForPassword error message: 'to' being repeated two times by ALi.w (@ALiwoto) in #1902
- CI: Use new Ubuntu 22.04 image and remove deprecated Ubuntu 18.04 by Christoph Bergmeister (@bergmeister) in #1847
- Change double quotes to single where possible by Sean Wheeler (@sdwheeler) in #1911
- Backport MicrosoftDocs PR 143 by Sean Wheeler (@sdwheeler) in #1910
- Fix typos in rules documentation by Sean Wheeler (@sdwheeler) in #1913
- add demand for compliance job by Travis Plunk (@TravisEz13) in #1920
- FabricBot: Onboarding to GitOps.ResourceManagement because of FabricBot decommissioning by @microsoft-github-policy-service in #1925
- Sync changes from Docs repository by Sean Wheeler (@sdwheeler) in #1929
- Developer documentation fix and message fix of PossibleIncorrectUsageOfRedirectionOperatorDescription by Joel Tipke (@JoelTipke) in #1928
- Documentation corrections for AvoidUsingPositionalParameters by @ImportTaste in #1917
- Update minimum PowerShell Core version to 7.2.11 as 7.0 is now EOL by Christoph Bergmeister (@bergmeister) in #1872
- Remove dead code and simplify by Christoph Bergmeister (@bergmeister) in #1856
- PSReservedParams - link about_CommonParameters by Peter Vandivier (@petervandivier) in #1908
- Generate strongly typed resources as part of build by Christoph Bergmeister (@bergmeister) in #1855
- Bump Newtonsoft.Json to 13.0.3 by Dependabot (@dependabot) in #1866
- Use latest .NET 6.0 SDK patch version and update devcontainer to use .NET 6 as well by Christoph Bergmeister (@bergmeister) in #1955
- Bump Microsoft.Management.Infrastructure from 1.0.0 to 3.0.0 for PowerShell 7 only by Dependabot (@dependabot) in #1947
- Bump version from 1.21.0 to 1.22.0 by Christoph Bergmeister (@bergmeister) in #1965
- Remove Appveyor badge from main README by Christoph Bergmeister (@bergmeister) in #1962
- Do not hard code common parameters in module help test any more by Christoph Bergmeister (@bergmeister) in #1963
New Contributors
- Frode Flaten (@fflaten) made their first contribution in #1897
- ALi.w (@ALiwoto) made their first contribution in #1902
- @microsoft-github-policy-service made their first contribution in #1925
- Joel Tipke (@JoelTipke) made their first contribution in #1928
- @ImportTaste made their first contribution in #1917
- Liam Peters (@liamjpeters) made their first contribution in #1922
- Peter Vandivier (@petervandivier) made their first contribution in #1908
- ewisniew0 made their first contribution in #1865
- James Brundage (@StartAutomating) made their first contribution in #1946
- Eli Arbel (@aelij) made their first contribution in #1954
- Friedrich Weinmann (@FriedrichWeinmann) made their first contribution in #1921
Full Changelog: 1.21.0...1.22.0