You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Really loving the syntax highlighting in combo with VSCode. I've been looking for a way to defeat my ultimate Powershell enemy:
if\s*\(.*=.*\)
Any valid uses for this? Would a warning be warranted? Any way I can extend ISE or VSCode to do this?
Thanks in advance for consideration.
The text was updated successfully, but these errors were encountered:
Are you trying to remove whitespace from these statements? You might appreciate a new code formatting rule that is coming in the next release which allows you to control this.
Thanks! No, I'm trying to avoid writing the statement if ($a = $b) {do something} which in Powershell doesn't generate a syntax error, just does the assignment, but is clearly meant to be if ($a -eq $b) {do something}. Too many years of that overloaded equals sign being able to do comparisons in the right context, old habits die hard. It's a pretty tough bug to find for me, would be great to have a hint that it might be wrong, or a way to easily extend the hinting or error matching with regex configs.
Hello,
Really loving the syntax highlighting in combo with VSCode. I've been looking for a way to defeat my ultimate Powershell enemy:
if\s*\(.*=.*\)
Any valid uses for this? Would a warning be warranted? Any way I can extend ISE or VSCode to do this?
Thanks in advance for consideration.
The text was updated successfully, but these errors were encountered: