◐ Shell
clean mode source ↗

UseConsistentWhitespace: Fix CheckParameter bug when using interpolated string by bergmeister · Pull Request #1498 · PowerShell/PSScriptAnalyzer

PR Summary

Fixes #1495

I thought the searchNestedScriptBlocks: false option would not make it return nested objects in commandAst.FindAll. However, for an interpolated string, the VariableExpressionAst of the ExpendableStringExpressionAst is returned as well, therefore checking that only AST are returned whose parent is the commandAst.

PR Checklist