FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

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

UseConsistentWhitespace: Fix CheckParameter bug when using interpolated string - #1498

Merged
Christoph Bergmeister (bergmeister) merged 1 commit into
PowerShell:masterfrom
bergmeister:issue1495
May 18, 2020
Merged

UseConsistentWhitespace: Fix CheckParameter bug when using interpolated string#1498
Christoph Bergmeister (bergmeister) merged 1 commit into
PowerShell:masterfrom
bergmeister:issue1495

Conversation

Christoph Bergmeister (bergmeister) commented May 14, 2020
edited
Loading

Copy link
Copy Markdown
Collaborator

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CheckParameter option of UseConsistentWhitespace (off by default): When turned, on removes part of script

2 participants


Back | FazBrowse Home | New Git URL