Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing empty script literal to ForEach-Object followed by path contains backtick escaped character displays false-positive syntax error highlight #101

Open
KisaragiEffective opened this issue May 2, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed parser Issues related to PowerShell script parsing

Comments

@KisaragiEffective
Copy link

Get-Content ./query`(`).json | ForEach-Object {}
#                                            ^ <command parameter>, <path expression> or <redirection> expected, got '{'
Get-Content ./query`(.json | ForEach-Object {}
#                                          ^ <command parameter>, <path expression> or <redirection> expected, got '{'
Get-Content ./query.json | ForEach-Object {}
# ^ No Error

A ForEach-Object cmdlet with empty script block is valid, yields no element.

@ForNeVeR ForNeVeR added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers parser Issues related to PowerShell script parsing labels Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed parser Issues related to PowerShell script parsing
Projects
None yet
Development

No branches or pull requests

2 participants