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
Thanks for taking the time to report this issue. This is a duplicate of #847 and I believe it is by design because the setting whitespaceAroundOperator does exactly what it is supposed to do.
I can understand however that the resulting formatting is not desired in this case,
PSSA has 3 built in rule sets (Allman, etc.) that VSCode uses as well and I think the best solution would be to tweak them and to come up with a more refined ruleset that allows certain exceptions like this case.
Issue Description
So I opened this bug at the VSCode repo:
PowerShell/vscode-powershell#1237
It's about unary operators that (from what I can tell), aren't handled correctly when formatting the code.
This:
Becomes this:
When formatting the code in VSCode with powershell.codeFormatting.whitespaceAroundOperator set to true.
I got a response from @tylerl0706 who clarified that this formatting actually comes from PSSA, which is why I created a bug here instead.
What do you think?
Thanks!
The text was updated successfully, but these errors were encountered: