-
Notifications
You must be signed in to change notification settings - Fork 510
Formatter does not obey some whitespace settings #2375
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
Comments
@anttiah thanks for opening this issue and providing repo steps! I am having some trouble reproducing this issue after our latest release--it would be great to know what your settings.json looks like. It would also be helpful to know if you are using the PowerShell Extension or our preview version of the PowerShell Extension? |
Hi @SydneyhSmith thank you for your prompt response. I'm using release version:
Before my tests I deleted directories HTH |
Thanks for the additional information @anttiah I am able to reproduce this in our "stable" PowerShell extension but not in the PowerShell Preview extension...we recently published an update to our Preview Extension which has addressed a number of underlying architectural issues, would you mind giving it a try and letting us know if you are still hitting this issue? The good news is that we expect these changes to hit our "stable" PowerShell extension in our next release |
@bergmeister did we cherry pick this poorly again 😅 |
@SydneyhSmith Does not happen with the preview version. Don't know if this is just a typo or cherry pick related but I noticed that preview version writes the |
This issue is being closed as inactive, if this issue is still occurring it will be re-opened |
Issue is still occurring. |
I don't think it is a cherry picking problem, by quickly looking at the 2 PSES branches @TylerLeonhardt . @anttiah is right though that the preview extension changed the settings to start all with a lowercase (PR #1867) 9 months ago. |
Ok, I've checked PSSA, which works fine ( |
Fixed in that PR ^ |
Issue Description
The
powershell.codeFormatting.WhitespaceInsideBrace
setting has no effect and formatter adds whitespaces regardless of its value.This has been around since 2019.9.0. I was hoping it would get fixed in this release but it didn't.
AFAIK, this one has nothing to do with the pipeline indentation issues reported earlier and should not be treated as a duplicate of any of those.
Steps to reproduce
Set
"powershell.codeFormatting.WhitespaceInsideBrace": false
Type into the editor
& {0}
Format document (
Alt
+Shift
+F
)Expected behaviour
& {0}
No whitespace gets added inside braces.
Actual, incorrect behavior
& { 0 }
Note the added whitespace after the
{
and before the}
.Environment data
vscode-powershell v2019.12.0
VS Code
Notes
This is basically a duplicate of #2245 but it got closed with erroneous information before I found it and managed to comment.
The text was updated successfully, but these errors were encountered: