Skip to content
Choose a tag to compare

1.20.0 - 2021-08-20


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


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


  • 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 (#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 links from (#1558) (thanks @clcaldwell)
  • Fix typo in AvoidUsingCmdletAliases documentation (#1590) (thanks @rubengonzalez-dev)


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 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)
Choose a tag to compare


  • 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



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


Development improvements

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


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


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)


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


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


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


  • 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


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


  • Update readme with changes to default branch being master now (#1265) (by @bergmeister)
  • 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!)


Choose a tag to compare

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


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


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)



Choose a tag to compare

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

Breaking Changes

  • Minimum required version of PowerShell Core was raised from 6.0.2 to 6.1.0 due to 6.0 having reached the end of its support life-cycle. (#1165)
  • Updated used version of Newtonsoft.Json to 11.0.2. (#1165) (by @bergmeister)
  • Command data files of PowerShell 6.0 were removed. Updated files for PowerShell 6.1 were added. This means that users that have customized the UseCompatibleCmdlets rule, need to either adapt the version string as per rule documentation or can alternatively copy in the old command data files into the Settings installation folder (#1075) (by @bergmeister)
  • The minimum required runtime of the full .Net Framework was raised from 4.5.1 to 4.5.2 as 4.5.1 is not supported any more. If the OS is patched then Windows update will have ensured that the newer runtime patch is available. (#1108) (by @bergmeister)
  • Emit parsing errors as diagnostic records (#1130) (by @JamesWTruher)

Formatter Rules

  • Add UseCorrectCasing formatting rule for cmdlet/function name (#1117) (by @bergmeister)
  • Fix PSUseConsistentIndentationRule to handle pipes correctly when there is a multi-line statement after a pipe and add PipelineIndentation customisation option for it (#1102) (by @bergmeister)
  • Add CheckInnerBrace and CheckPipe options to PSUseConsistentWhitespace (#1092) (by @bergmeister)

Script Analysis Rules

  • Add command data file for PowerShell 2.0 (#1091) (by @bergmeister)
  • Add command data files of PowerShell 6.1.0 (#1075) (by @bergmeister)
  • New PowerShell compatibility rules: UseCompatibleCommands, UseCompatibleSyntax and UseCompatibleTypes (#1156, #1133, #1176 and #1179) (by @rjmholt and @JamesWTruher)
  • Make PossibleIncorrectComparisonWithNull rule return a SuggestCorrection for auto-fixes in VS-Code or via the -Fix switch (#1115) (by @bergmeister)
  • Make UseCompatibleCmdlets not throw if default reference desktop-5.1.14393.206-windows is specified in the list of platforms and use core-6.1.0-windows as an alternative default reference (#1043 and #1075) (by @bergmeister)

Custom Rules


  • Add support for Hashtable syntax of Import-DscRessource for -SaveDscDependency switch (#1138) (by @bergmeister)
  • Take module version into account for -SaveDscDependency switch (#1094) (by @bergmeister)


Multi-threading efficiency was highly improved leading to a speedup whilst keeping the CPU usage roughly the same. One can expect PSScriptAnalyzer (PSSA) 1.18.0 to be more than twice as fast in most situations (including 'cold' runs) compared to its predecessor 1.17.0.

Fixes and General Improvements

  • Fix bug when culture was set to Turkish (#1095) (by @bergmeister)
  • Fix settings file array parsing when no commas are present (#1161) (by @rjmholt)
  • Ensure correct disposal with using statement (#1164) (by @bergmeister)
  • Fix bug that caused Invoke-ScriptAnalyzer to not run any rule after an execution of Invoke-Formatter in the same session (but Invoke-ScriptAnalyzer would've recovered when being called again) (#1121) (by @bergmeister)
  • Fix parsing of empty hashtable when string is provided as settings object (#1073) (by @bergmeister)
  • Fix AlignAssignment rule to calculate alignment position correctly and avoid crash (#1070) (by @bergmeister)
  • Don't crash on CIM classes with no superclass (#1046) (Thanks @edyoung!)
  • Trigger AvoidPositionalParameters rule for function defined and called inside a script. (#963 and #1175) (Thanks @kalgiz! and @bergmeister)
  • Add OutputType attributes to cmdlets to enhance tab completion (#1020) (by @bergmeister)
  • Allow paths to be pipelined to Invoke-ScriptAnalyzer (#1040) (Thanks @edyoung!)
  • PSGallery will no longer use PSAvoidUsingConvertToSecureStringWithPlainText and PSAvoidUsingUserNameAndPasswordParams rules (#1037) (Thanks @edyoung!)


  • Update platyps to 0.13 (#1172) (by @bergmeister)
  • Raise minimum required PS version of PS 6 to 6.1.0 due to 6.0 running out of support now and update Newtonsoft.Json to 11.0.2 (#1165) (by @bergmeister)
  • Unify reference to Microsoft.Management.Infrastructure and update System.Reflection.TypeExtensions NuGet package (#1105) (by @bergmeister)
  • Update .Net Core SDK from 2.2.103 to 2.2.104 (latest patch) (#1158) (by @bergmeister)
  • Make it easier to install the dotnet CLI tools (#1139) (by @JamesWTruher)
  • Simplify build scripts even more and upgrade platyPS in Appveyor #1088 (by @bergmeister)
  • Upgrade .Net SDK to 2.2.102 to fix new test failures on AppVeyor's Ubuntu image due an image update (#1128) (by @bergmeister)
  • Mark setting files as content for easier out-of-the-box debugging (#1104) (by @bergmeister)
  • Upgrade from net451 to net452 since net451 is not supported any more and net452 is an in-place upgrade anyway (#1108) (by @bergmeister)
  • Install dotnet sdk if missing on Unix as well to fix failing Ubuntu build due to image update and Pester/PowerShell bug (#1107) (by @bergmeister)
  • Removes update of pwsh since appveyor images are updated (#1084) (Thanks @wilmardo!)
  • Update, simplify, and consolidate build scripts (#1082) (by @JamesWTruher)
  • Bump .Net Core SDK version to 2.1.401 (#1086) (Thanks @wilmardo!)
  • Use RTM version of Microsoft.Management.Infrastructure (#1059) (by @bergmeister)
  • Upgrade Microsoft.PowerShell.5.ReferenceAssemblies from 1.0.0 to 1.1.0 and remove redundant/transitive references (#1050) (by @bergmeister)
  • Remove RuntimeFrameworkVersion as this is given by the running version of PS anyway and .Net would upgrade automatically anyway if possible (#1052) (by @bergmeister)
  • Upgrade Nuget packages (System.Reflection.TypeExtensions and Microsoft.CSharp) and make them more consistent (#1051) (by @bergmeister)
  • give explicit error on unsupported versions of pscore and document it (#1049) (by @bergmeister)
  • Remove old and redundant test settings file core-6.0.0-alpha-windows.json (#1044) (by @bergmeister)
  • Use TLS 1.2 for bootstrapping dotnet in CI (#1047) (by @bergmeister)
  • Remove redundant/outdated build scripts and cleanup (#1011) (by @bergmeister)
  • Upload only out folder as artifact, which is the actual PSSA artifact (#1009) (by @bergmeister)


  • Fix the "How" section #1127 (Thanks @alexandair!)
  • Make the correct example use the declared variable (#1111) (Thanks @f0nt4!)
  • Correcting CommunityRules to CommunityAnalyzerRules (#1119) (Thanks @kvprasoon!)
  • Add summary comment to some rules with short description (#1087) (Thanks @pedrocodacy!)
  • Update PR template to be more similar to the one of PowerShell but still distinguish where necessary (#1077)
  • Update documentation of PSUseConsistentWhiteSpace: enhance example and correct argument type. #1069 (Thanks @TheIncorrigible1!)
  • Update fix typo (#1068) (Thanks @TheIncorrigible1!)
Choose a tag to compare

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

Note: The minimum supported/working version of PowerShell Core is 6.0.2.

Patches 1.17.0 mainly to fix

Choose a tag to compare

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

Because We noticed an issue with installing from the gallery where one had to use -SkipPublisherCheck when running Install-Module
Install-Module -Name PSScriptAnalyzer -SkipPublisherCheck due to a wrong file catalog signing hash, therefore the module was pulled from the Gallery at the end and version 1.17.1 should be used instead.

New Parameters

  • Add -ReportSummary switch (#895) (Thanks @StingyJack! for the base work that got finalized by @bergmeister)
  • Add -EnableExit switch to Invoke-ScriptAnalyzer for exit and return exit code for CI purposes (#842) (by @bergmeister)
  • Add -Fix switch to -Path parameter set of Invoke-ScriptAnalyzer (#817, #852) (by @bergmeister)

New Rules and Warnings

  • Warn when 'Get-' prefix was omitted in AvoidAlias rule. (#927) (by @bergmeister)
  • AvoidAssignmentToAutomaticVariable. NB: Currently only warns against read-only automatic variables (#864, #917) (by @bergmeister)
  • PossibleIncorrectUsageOfRedirectionOperator and PossibleIncorrectUsageOfAssignmentOperator. (#859, #881) (by @bergmeister)
  • Add PSAvoidTrailingWhitespace rule (#820) (Thanks @dlwyatt!)

Fixes and Improvements

  • AvoidDefaultValueForMandatoryParameter triggers when the field has specification: Mandatory=value and value!=0 (#969) (by @kalgiz)
  • Do not trigger UseDeclaredVarsMoreThanAssignment for variables being used via Get-Variable (#925) (by @bergmeister)
  • Make UseDeclaredVarsMoreThanAssignments not flag drive qualified variables (#958) (by @bergmeister)
  • Fix PSUseDeclaredVarsMoreThanAssignments to not give false positives when using += operator (#935) (by @bergmeister)
  • Tweak UseConsistentWhiteSpace formatting rule to exclude first unary operator when being used in argument (#949) (by @bergmeister)
  • Allow -Setting parameter to resolve setting presets as well when object is still a PSObject in BeginProcessing (#928) (by @bergmeister)
  • Add macos detection to New-CommandDataFile (#947) (Thanks @GavinEke!)
  • Fix PlaceOpenBrace rule correction to take comment at the end of line into account (#929) (by @bergmeister)
  • Do not trigger UseShouldProcessForStateChangingFunctions rule for workflows (#923) (by @bergmeister)
  • Fix parsing the -Settings object as a path when the path object originates from an expression (#915) (by @bergmeister)
  • Allow relative settings path (#909) (by @bergmeister)
  • Fix AvoidDefaultValueForMandatoryParameter documentation, rule and tests (#907) (by @bergmeister)
  • Fix NullReferenceException in AlignAssignmentStatement rule when CheckHashtable is enabled (#838) (by @bergmeister)
  • Fix FixPSUseDeclaredVarsMoreThanAssignments to also detect variables that are strongly typed (#837) (by @bergmeister)
  • Fix PSUseDeclaredVarsMoreThanAssignments when variable is assigned more than once to still give a warning (#836) (by @bergmeister)

Engine, Building and Testing

  • Support SuggestedCorrections property on DiagnosticRecord for script based rules #1000 (by @bergmeister)
  • Add CommandData files of PowerShell Core 6.0.2 for Windows/Linux/macOS and WMF3/4 that are used by UseCompatibleCmdlets rule (#954) (by @bergmeister)
  • If no path is found or when using the -ScriptDefinition parameter set, default to the current location for the directory search of the implicit settings file (#979) (by @bergmeister)
  • Allow TypeNotFound parser errors (#957) (by @bergmeister)
  • Fix release script by building also for v3 and misc. improvements (#996) (by @bergmeister)
  • Scripts needed to build and sign PSSA via MS VSTS so it can be published in the gallery (#983) (by @JamesWTruher)
  • Move common test code into AppVeyor module (#961) (by @bergmeister)
  • Remove extraneous import-module commands in tests (#962) (by @JamesWTruher)
  • Upgrade 'System.Automation.Management' NuGet package of version 6.0.0-alpha13 to version 6.0.2 from powershell-core feed, which requires upgrade to netstandard2.0. NB: This highly improved behavior on WMF3 but also means that the latest patched version (6.0.2) of PowerShell Core should be used. (#919) by @bergmeister)
  • Add Ubuntu Build+Test to Appveyor CI (#940) (by @bergmeister)
  • Add PowerShell Core Build+Test to Appveyor CI (#939) (by @bergmeister)
  • Update Newtonsoft.Json NuGet package of Rules project from 9.0.1 to 10.0.3 (#937) (by @bergmeister)
  • Fix Pester v4 installation for Visual Studio 2017 image and use Pester v4 assertion operator syntax (#892) (by @bergmeister)
  • Have a single point of reference for the .Net Core SDK version (#885) (by @bergmeister)
  • Fix regressions introduced by PR 882 (#891) (by @bergmeister)
  • Changes to allow tests to be run outside of CI (#882) (by @JamesWTruher)
  • Upgrade platyPS from Version 0.5 to 0.9 (#869) (by @bergmeister)
  • Build using .Net Core SDK 2.1.101 targeting netstandard2.0 and net451 (#853, #854, #870, #899, #912, #936) (by @bergmeister)
  • Add instructions to make a release (#843) (by @kapilmb)

Documentation, Error Messages and miscellaneous Improvements

  • Added Chocolatey Install help, which has community support (#999) (Thanks @pauby)
  • Finalize Release Logs and bump version to 1.17 (#1002) (by @bergmeister)
  • Docker examples: (#987, #990) (by @bergmeister)
  • Use multiple GitHub issue templates for bugs, feature requests and support questions (#986) (by @bergmeister
  • Fix table of contents (#980) (by @bergmeister)
  • Improve documentation, especially about parameter usage and the settings file (#968) (by @bergmeister)
  • Add base changelog for 1.17.0 (#967) (by @bergmeister)
  • Remove outdated about_scriptanalyzer help file (#951) (by @bergmeister)
  • Fixes a typo and enhances the documentation for the parameters required for script rules (#942) (Thanks @MWL88!)
  • Remove unused using statements and sort them (#931) (by @bergmeister)
  • Make licence headers consistent across all .cs files by using the recommended header of PsCore (#930) (by @bergmeister)
  • Update syntax in ReadMe to be the correct one from get-help (#932) by @bergmeister)
  • Remove redundant, out of date Readme of RuleDocumentation folder (#918) (by @bergmeister)
  • Shorten contribution section in ReadMe and make it more friendly (#911) (by @bergmeister)
  • Update from Pester 4.1.1 to 4.3.1 and use new -BeTrue and -BeFalse operators (#906) (by @bergmeister)
  • Fix Markdown in so it renders correctly on GitHub web site (#898) (Thanks @MWL88!)
  • Fix typo in .Description for Measure-RequiresModules (#888) (Thanks @TimCurwick!)
  • Use https links where possible (#873) (by @bergmeister)
  • Make documentation of AvoidUsingPositionalParameters match the implementation (#867) (by @bergmeister)
  • Fix PSAvoidUsingCmdletAliases warnings of internal build/release scripts in root and Utils folder (#872) (by @bergmeister)
  • Add simple GitHub Pull Request template based off the one for PowerShell Core (#866) (by @bergmeister)
  • Add a simple GitHub issue template based on the one of PowerShell Core. (#865, #884) (by @bergmeister)
  • Fix Example 7 in (#862) (Thanks @sethvs!)
  • Use the typewriter apostrophe instead the typographic apostrophe (#855) (Thanks @alexandear!)
  • Add justification to ReadMe (#848) (Thanks @KevinMarquette!)
  • Fix typo in README (#845) (Thanks @misterGF!)

Please see the CHANGELOG for the latest information about the changes in the release.

You can download this version from PowerShellGallery.

Choose a tag to compare

Please see the CHANGELOG for information about the changes in the release.

You can download this version from PowerShellGallery.