Skip to content

Releases: PowerShell/PSScriptAnalyzer

1.24.0

18 Mar 16:22
4b4a136
Compare
Choose a tag to compare

What's Changed

Breaking Changes

Minimum required PowerShell version raised from 3 to 5.1

New Features

  • Add new options (enabled by default) to formatting rule UseCorrectCasing to also correct operators, keywords and commands - Add UseConsistentCasing by @Jaykul in #1704

Enhancements

  • PSAlignAssignmentStatement: Ignore hashtables with a single key-value pair by @liamjpeters in #1986
  • Use RequiredResource hashtable to specify PowerShell module versions by @andyleejordan in #2053
  • Set exit code of Invoke-ScriptAnalyzer -EnableExit to total number of diagnostics (#2054) by @MatejKafka in #2055
  • PSAvoidAssignmentToAutomaticVariable: Ignore when a Parameter has an Attribute that contains a Variable expression by @liamjpeters in #1988
  • Trim unnecessary trailing spaces from string resources in Strings.resx by @XPlantefeve in #1972
  • Do not print summary repeatedly for each logger by @MatejKafka in #2058
  • Make Settings type detection more robust by @Tadas in #1967
  • Add foreach Assignment to AvoidAssignmentToAutomaticVariable by @PoshAJ in #2021
  • Invoke-ScriptAnalyzer: Stream diagnostics instead of batching by @MatejKafka in #2062
  • Invoke-ScriptAnalyzer: Print summary only once per invocation by @MatejKafka in #2063
  • Invoke-ScriptAnalyzer: Include parse errors in reported error count by @MatejKafka in #2069
  • Add exception message for missing rules by @Tadas in #1968

Bug Fixes

  • Update links in module manifest by @martincostello in #2034
  • Fix incorrect -ReportSummary Pester test grouping by @MatejKafka in #2057
  • Fixed erroneous PSUseDeclaredVarsMoreThanAssignments for some globals variables by @John-Leitch in #2013
  • PSReservedParams: Make severity Error instead of Warning by @liamjpeters in #1989
  • PSUseConsistentIndentation: Check indentation of lines where first token is a LParen not followed by comment or new line by @liamjpeters in #1995
  • PSUseConsistentWhitespace: Correctly fix whitespace between command parameters when parameter value spans multiple lines by @liamjpeters in #2064
  • PSAvoidTrailingWhitespace: Rule not applied when using formatter + single character lines with trailing whitespace are truncated by @liamjpeters in #1993
  • PSUseConsistentWhitespace: Ignore whitespace between separator and comment by @liamjpeters in #2065
  • PSReviewUnusedParameter false positive for ValueFromPipeline by @liamjpeters in #2072
  • Change severity of UseCorrectCasing to be Information by @bergmeister in #2082

Process Changes

New Contributors

Full Changelog: 1.23.0...1.24.0

1.23.0

09 Oct 21:12
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.22.0...1.23.0

PSScriptAnalyzer v1.22.0

05 Mar 22:36
c085ee3
Compare
Choose a tag to compare

Minimum required version when using PowerShell 7 is now 7.2.11.

New Rule

  • Add AvoidUsingAllowUnencryptedAuthentication by @MJVL in #1857
  • Add the AvoidExclaimOperator rule to warn about the use of the ! negation operator. Fixes #1826 by @liamjpeters in #1922

Enhancements

  • Enable suppression of PSAvoidAssignmentToAutomaticVariable for specific variable or parameter by @fflaten in #1896
  • Upgrade to use .NET 6 since PowerShell 7.0 is now out out of support by @bergmeister in #1873
  • Convert UseSingularNouns to configurable rule and add Windows to allowlist by @MJVL in #1858
  • Add ErrorView to SpecialVars.cs by @ewisniew0 in #1865
  • Allow suppression of PSUseSingularNouns for specific function by @fflaten in #1903
  • Adding ToString() methods to [CorrectionExtent] and [DiagnosticRecord] by @StartAutomating in #1946
  • Add PSNativeCommandUseErrorActionPreference preference variable by @aelij in #1954
  • AvoidUsingPositionalParameter: Check if command has parameters to avoid having az in default CommandAllowList by @bergmeister in #1850
  • PSReviewUnusedParameter: Add CommandsToTraverse option by @FriedrichWeinmann in #1921

Fixes

  • Prevent NullReferenceException for null analysis type. by @hubuk in #1949

Build & Test, Documentation and Maintenance

  • UseApprovedVerbs.md: Backport minor change of PR 104 in PowerShell-Docs-Modules by @bergmeister in #1849
  • Improve Pester bootstrap logic for CI by @bergmeister in #1853
  • Bump .NET SDK from 3.1.419 to 3.1.424 by @bergmeister in #1852
  • AvoidLongLines: Make internal function DiagnosticSeverity private by @bergmeister in #1851
  • SupportsShouldProcess.md: Fix Typo - MicrosoftDocs backport of PR 121 there by @sdwheeler in #1869
  • Minor test fix for UseCorrectCasing rule by @kilasuit in #1885
  • Make Invoke-Formatter test case assertion fail in case of incorrect casing by @alexandear in #1888
  • Fix AvoidUsingDoubleQuotesForConstantString information in overview README by @michaeltlombardi in #1883
  • Update dependabot reviewers to remove Rob by @fflaten in #1897
  • Fix typo in AvoidUsingPlainTextForPassword error message: 'to' being repeated two times by @ALiwoto in #1902
  • CI: Use new Ubuntu 22.04 image and remove deprecated Ubuntu 18.04 by @bergmeister in #1847
  • Change double quotes to single where possible by @sdwheeler in #1911
  • Backport MicrosoftDocs PR 143 by @sdwheeler in #1910
  • Fix typos in rules documentation by @sdwheeler in #1913
  • add demand for compliance job by @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 @sdwheeler in #1929
  • Developer documentation fix and message fix of PossibleIncorrectUsageOfRedirectionOperatorDescription by @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 @bergmeister in #1872
  • Remove dead code and simplify by @bergmeister in #1856
  • PSReservedParams - link about_CommonParameters by @petervandivier in #1908
  • Generate strongly typed resources as part of build by @bergmeister in #1855
  • Bump Newtonsoft.Json to 13.0.3 by @dependabot in #1866
  • Use latest .NET 6.0 SDK patch version and update devcontainer to use .NET 6 as well by @bergmeister in #1955
  • Bump Microsoft.Management.Infrastructure from 1.0.0 to 3.0.0 for PowerShell 7 only by @dependabot in #1947
  • Bump version from 1.21.0 to 1.22.0 by @bergmeister in #1965
  • Remove Appveyor badge from main README by @bergmeister in #1962
  • Do not hard code common parameters in module help test any more by @bergmeister in #1963

New Contributors

Full Changelog: 1.21.0...1.22.0

PSScriptAnalyzer v1.21.0

29 Sep 20:23
9a6ce97
Compare
Choose a tag to compare

1.21.0 - 2022-09-14

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 AvoidUsingBrokenHashAlgorithms (#1787) (thanks @MJVL)

Enhancements

  • Also return suggestion to use PSCredential for AvoidUsingPlainTextForPassword rule (#1782) (by @bergmeister)
  • Invoke-Formatter: Accept input from pipeline (#1763) (by @bergmeister)
  • PSAvoidUsingPositionalParameters: Do not warn on AZ CLI (#1846) (by @bergmeister)
  • PSAvoidUsingPositionalParameters: Do not warn on AZ CLI (#1846) (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, Documentation and Maintenance

PSScriptAnalyzer v1.20.0

24 Aug 19:47
6dbf6a1
Compare
Choose a tag to compare

1.20.0 - 2021-08-20

Fixes

  • Replace unhelpful warning around process aliasing Get-Process with warning about misused syntax (#1638) (by @bergmeister)
  • Fix FunctionInfo fallback AST attribute analysis for UseShouldProcessCorrectly (#1659) (thanks @hubuk)
  • Do not increase indentation after a left parenthesis if the previous token is a newline and the next token is not a newline (#1469) (by @bergmeister)
  • UseConsistentWhitespace - CheckOpenBrace setting: Do not warn when being preceded by open parenthesis (#1633) (by @bergmeister)

New Rule

  • Make UseSingularNouns rule work in PowerShell 7 (#1627) (by @bergmeister)
  • UseConsistentWhitespace: Create option to ignore assignment operator inside hashtable (#1566) (thanks @daviesj)

Miscellaneous

  • Implement -IncludeSuppressions parameter (#1701) (by @rjmholt)
  • Combine multiple suppressions applied to the same diagnostic (#1699) (by @rjmholt)
  • Use dependabot to keep dependencies up to date (#1664) (by @rjmholt)
  • Add reviewers and explicit dependency exclusions to dependabot (#1676) (by @rjmholt)
  • Remove explicit registries in dependabot (#1671) (by @rjmholt)

Documentation

  • Link to PSScriptAnalyzer rule documentation from the README (#1642) (thanks @bbodenmiller)
  • Add HelpInfoUri to module manifest (#1651) (by @sdwheeler)
  • Add documentation around CustomRulePath in Settings file to README.md (#1636) (thanks @johlju)
  • Use allowlist and blocklist terminology, supply alternate configuration key for PSAvoidUsingCmdletAliases (#1604) (by @bergmeister)
  • Fix suppression example errors in README (#1593) (by @rjmholt)
  • Fix AvoidLongLines documentation example (#1554) (thanks @floh96)
  • Remove broken waffle.io links from readme.md (#1558) (thanks @clcaldwell)
  • Fix typo in AvoidUsingCmdletAliases documentation (#1590) (thanks @rubengonzalez-dev)

Testing

Development/Build Improvements

  • Fix build module tests (#1654) (thanks @clcaldwell)
  • Move to new signing process for release build and prep for 1.20.0 (#1625) (by @JamesWTruher)
  • Handle cases where the signature generator fails (#1661) (by @JamesWTruher)
  • Update .NET SDK to 3.1.408 (#1630) (by @bergmeister)
  • Simplify devcontainer setup and resolve git line ending conflicts (#1637) (by @bergmeister)
  • Speedup CI by bootstrapping PowerShell module installations in background and in parallel, whilst the .NET SDK is being installed (#1634) (by @bergmeister)
  • Upgrade release Dockerfile from Ubuntu 16.04 to 20.04 (#1631) (by @bergmeister)
  • Remove old powershell-core NuGet feed, which sometimes causes build failures (#1632) (by @bergmeister)
  • Remove reference to myget.org as a package resource (#1640) (by @JamesWTruher)
  • Add Ubuntu 20.04 to build matrix (#1628) (by @bergmeister)
  • Remove conditional compilation for PSv6/netstandard2.0 for Engine and Rules projects (#1600) (by @bergmeister)
  • Upgrade Microsoft.CSharp, Microsoft.Win32.Registry and System.Reflection.TypeExtensions from 4.5.0 to 4.7.0 (#1599) (by @bergmeister)
  • Use PowerShell preview extension for Github Codespaces (#1596) (by @bergmeister)
  • Update SMA reference for netcoreapp3.1 to from 7.0.0 to 7.0.3 (#1597) (by @bergmeister)
  • 🧹 Make usage of Microsoft.Management.Infrastructure consistent and reference it only once in CrossCompatibility project (#1601) (by @bergmeister)
  • Update launch.json (#1603) (by @bergmeister)
  • Make CI fail if tests fail and fix failing tests by making them Pester v5 compatible (#1553) (coauthored by @bergmeister)

PSScriptAnalyzer v1.19.1

30 Jul 17:13
8c5a638
Compare
Choose a tag to compare

Fixes

  • UseCorrectCasing: Do not use CommandInfoCache when CommandInfoParameters property throws due to runspace affinity problem of PowerShell engine (#1523) (by @bergmeister)
  • ReviewUnusedParameter: Do not trigger when MyInvocation.BoundParameters or PSCmdlet.MyInvocation.BoundParameters is used (#1520) (Thanks @jegannathanmaniganadan!)
  • PipelineIndentationStyle.None: Fix bug that caused incorrect formatting in hashtables (#1497) (by @bergmeister)
  • UseUsingScopeModifierInNewRunspaces: Fix ArgumentException when the same variable name is used in 2 different sessions. (#1493) (by @bergmeister)
  • UseConsistentWhitespace

New Rule

Miscellaneous

Documentation

  • Remove references to Windows in Introduction of Readme.md (#1509) (Thanks @hjorslev!)

Testing

Development improvements

PSScriptAnalyzer v1.19.0

04 May 18:00
0bdcc32
Compare
Choose a tag to compare

New Rules

Rule Enhancements

  • Add more automatic variables to PSAvoidAssignmentToAutomaticVariables that are not read-only but should still not be assigned to in most cases (#1394) (by @bergmeister)

Compatibility Rules

Formatter

  • UseCorrectCasing
  • UseConsistentIndentation
    • When non-default options are used, cater for the case of a comment between pipe and newline (#1463)
    • Add PipelineIndentationStyle.None option for scenarios where indentation is custom, inconsistent or the user does not like any of the 3 pipeline indentation styles (#1399) (by @bergmeister)
    • Fix complex case when PipelineIndentation is not set to default (NoIndentation) (#1359) (by @bergmeister)
  • UseConsistentWhitespace
    • Split CheckPipe feature of trimming redundant whitespace out into option CheckPipeForRedundantWhiteSpace (#1413) (by @bergmeister)
    • Set default of CheckParameter configuration setting to false to ensure that setting won't be enabled by default if an old version of the VS-Code extension uses a new version of - PSScriptAnalyzer (1.19) (#1411) (by @bergmeister)
    • Remove redundant whitespace between parameters with new option (disabled by default) in UseConsistentWhitespace (#1392) (by @bergmeister)
    • Ignore empty hashtable for CheckInnerBrace configuration (#1349) (by @bergmeister)

Performance

The Formatter can now be multiple times faster depending on the use case and especially scaling problems were addressed that showed when analyzing large scripts with thousands of lines (a 3000 line test script was used in the below performance figures). Optimisations were to

  • Eliminate initialization overhead, which can lead to a reduced time of up to 50%
  • Optimize operations in rules to make them scale better, another improvement of around 50%
  • The formatter used to re-parse the script in between every rule run but this is skipped now if the previous rule did not emit a DiagnosticRecord as it means the script text hasn't changed and doesn't need updating. Therefore formatting will be faster on scripts that need no to little changes.

A small improvement was made to a script analysis rule as well but the gain is offset by the addition of the new rules in this release.

The PRs for those improvements are:

  • Eliminate Regex overhead in AvoidTrailingWhitespace -> Speedup of 5% (PowerShell 5.1) or 2.5 % (PowerShell 7.1-preview.2) (#1465) (by @bergmeister)
  • Formatter: Recycle parsed AST and tokens in between rule invocations when no correction was applied to improve performance (#1462) (by @bergmeister)
  • Improve performance of UseConsistentIndentation even more > another 10% speedup for formatter (#1461) (by @bergmeister)
  • Improve performance of UseConsistentIndentation -> 35% speedup for formatter (#1458) (by @bergmeister)
  • Lazy initialisation of LinkedList in TokenOperations constructor -> 7% performance gain for formatter (#1453) (by @bergmeister)
  • Invoke-Formatter: Skip VariableAnalysis, which is not needed to yield a 50% performance improvement (#1451) (by @bergmeister)

Fixes

  • Fix edge case of PSUseConsistentIndentation for non-default value (IncreaseIndentationForFirstPipeline/IncreaseIndentationAfterEveryPipeline) (#1423) (by @bergmeister)
  • Fix rule suppression ID in compat rules (#1432) (by @rjmholt)
  • Changes to build analyzer for PS7 and PS6 and ship in separate directories and bump version to 1.19.0 (#1425) (by @JamesWTruher)
  • Use AST to determine SupportsShouldProcess when an error is thrown (#1397) (by @rjmholt)
  • Fix false positive of AvoidAlias rule for implicit aliasing of Get- commands for the CommandType ExternalScript (#1386) (by @bergmeister)

Build/Tests/Maintenance

  • Changelog for 1.19.0 (#1448) (by @bergmeister)
  • Use separate test.yaml files files since param passing of pwsh still doesn't seem to fully work correctly #1466 (by @bergmeister)
  • New build scripts for release pipeline (#1442) (by @JamesWTruher)
  • Make sure that tests always get uploaded, due to too much YAML indentation, condition was not applied (#1455) (by @bergmeister)
  • Cleanup csproj files: Remove code duplication for Configuration and entries in Rules project, since it depends on Engine project (#1450) (by @bergmeister)
  • Build: Use logging command as a temporary workaround due to billing bug preventing upload of pipeline artefacts (#1464) (by @bergmeister)
  • Use bracket syntax for passing yaml parameter (#1449) (by @bergmeister)
  • Update Newtonsoft.Json from 12.0.2 to 12.0.3 in Compatibility project as well (#1447) (by @bergmeister)
  • Replace usage of $MyInvocation.MyCommand.Path with $PSScriptRoot and cleanup tests as a preparation for Pester v5 (#1438) (by @bergmeister)
  • Compatibility tests: Use correct genericVerCases test case and remove invalid test case (#1440) (by @bergmeister)
  • Add out folder to .gitignore (#1443) (by @bergmeister)
  • Pin major version of Pester to 4 and upgrade Pester version for WMF4 build (#1433) (by @bergmeister)
  • ms-vscode.csharp to ms-dotnettools.csharp (#1424) (thanks @devlead!)
  • Upgrade .net sdk to latest path (#1421) (by @bergmeister)
  • Fix #1417 modulehelp false positives (#1418) (thanks @Jawz84!)
  • Increase macOs CI coverage to include both 10.14 and 10.15 as 10.15 has recently been added to Azure DevOps hosted agents (#1412) (by @bergmeister)
  • Fix vmImage entries in build to match description (#1409) (by @bergmeister)
  • Update .Net Core SDK from 3.1.100 to latest patch 3.1.101 (#1405) (by @bergmeister)
  • Multi-stage pipelines (to split build->test) (#1404) (by @bergmeister)
  • Use vmImage in yaml and merge build definitions into 1 by using jobs. Disable all AppVeyor images except for WMF4. Disable flaky UseCompatibleCommand tests on Ubuntu in CI (#1403) (by @bergmeister)
  • Azure pipelines migration (#1267) (by @bergmeister)
  • Add DevContainer support (#1286) (by @bergmeister)
  • Increase maximum runspace pool size in flaky test (#1358) (by @bergmeister)
  • Use latest version of PlatyPS in AppVeyor (#1390) (by @bergmeister)
  • .Net core sdk 3.1 (#1388) (by @bergmeister)
  • Use Where-Object instead of alias in buildmodule.tests.ps1 (#1360) (thanks @kvprasoon!)
  • Remove legacy methods (#1387) (by @bergmeister)
  • Upgrade .Net Core SDK version to a newer version that is also available in Visual Studio Online environment (#1377) (by @bergmeister)
  • Update Newtonsoft.Json from 12.0.1 to 12.02 (latest version), which increases the minimum PS Core version from 6.2.0 to 6.2.1 (#1357) (by @bergmeister)
  • Harden dotnet --version handling (#1367) (by @JamesWTruher)
  • Fix configuration for PS v5 and v6 builds to be Debug/Release as it used to be to allow for actual debug builds (#1356) (by @bergmeister)
  • Disable bad tests on Linux for now (#1365) (by @rjmholt)
  • Fix Ubuntu build and runspace test (#1340) (by @bergmeister)

Documentation

PSScriptAnalyzer v1.18.3

16 Sep 17:49
Compare
Choose a tag to compare

This release adds one more important fix, which prevents a leak of runspaces when repeatedly invoking the PSScriptAnalyzer cmdlets. Furthermore it ups the minimum version of PowerShell Core to 6.2.0 due to 6.1 reaching its end of life this month.

  • Change CommandInfoCache to implement IDisposable and clean up the runspace pool (#1335) (by @JamesWTruher)
  • Update Newtonsoft json to 12.0.1 due to PowerShell 6.1 going out of support (#1336) (by @bergmeister)

PSScriptAnalyzer v1.18.2

03 Sep 20:54
Compare
Choose a tag to compare

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

    • 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)
    • 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
  • 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

PSScriptAnalyzer v1.18.1

18 Jun 21:12
b1a8187
Compare
Choose a tag to compare

Please see the CHANGELOG for information about the changes in the release. You can download this version from PowerShellGallery.

Fixes

  • Formatter

    • UseCorrectCasing
      • Do not use alias name as key for command info cache to fix the problem where UseCorrectCasing corrects aliases (#1216) (by @bergmeister)
      • Fix wildcard lookups for command lookup and do not append .exe for applications on Windows (#1210) (by @bergmeister)
      • Do not correct applications or script paths at all (#1255) (by @bergmeister)
    • Prevent PSCloseBrace crash if hashtable definition start on first token and there is a PSCloseBrace violation (#1235) (by @bergmeister)
    • PipelineIndentationStyle
      • Fix formatting regression in 1.18.0 whereby single-line pipeline reduces indentation level incorrectly (#1191) (by @bergmeister)
      • Make IncreaseIndentationForFirstPipeline the true default option for PipelineIndentationStyle option (#1218) (by @bergmeister)
  • Compatibility Rules

    • Fix UseCompatibleSyntax class error message (#1215) (by @rjmholt)
    • Convert compatibility module to binary module, fix compatibility with Azure environments (#1212) (by @rjmholt)
    • Prevent .NET members with names differing only by case from crashing the compatibility profiler (#1195) (by @rjmholt)
    • Fix compatibility profile query API so that aliases referring to other modules appear (#1194) (by @rjmholt)
  • DSC

    • Instead of using the first cimClass and then having no superClass, use the first cimClass that has a non-null superClass (#1200) (by @bergmeister, thanks to @ykuijs! for the great collaboration)
    • Make -SaveDscDependency work on Linux (#1246) (by @bergmeister)
  • Enable suppression of custom rules when used together with -IncludeDefaultRules to allow all possible scenarios from 1.17.1 and 1.18.0. This removes also the check if the rule name in the suppression attribute can be found because this check is technically not possible in all scenarios (#1245) (by @bergmeister)

  • Fix NullReferenceException for class type (#1182) (by @bergmeister)

Performance

2 improvements were made that make cold runs of ScriptAnalyzer twice as fast compared to 1.18.0

  • Speedup cold runs by using a runspace pool (#1178) (by @bergmeister)
  • Fix logic errors in AvoidAlias rule to halve the amount of necessary calls to Get-Command, making the rule twice (#1251) (by @JamesWTruher)

General Improvements

  • Add ImplementingType to RuleInfo object for better settings file validation and settings template file creation (#1250) (by @JamesWTruher)
  • Fix typo in AvoidDefaultValueForMandatoryParameterError resource string (#1233) (Thanks @tnieto88!)
  • Change module root find function in CompatibilityRule (#1196) (by @rjmholt)

Documentation

Build