-
Notifications
You must be signed in to change notification settings - Fork 394
Code Formatting: Whitespace Before Open Brace #1531
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
@dsolodow Can you provide more details please? Given the following snippet if($foo){
'hello'
} The if($foo) {
'hello'
} The if ($foo){
'hello'
} If that is not the case for you please state that or your specific problem and the settings you use. |
Sure! [ValidateScript({Test-Path -Path $PSItem})] If powershell.codeFormatting.whitespaceBeforeOpenBrace is true, it shows as: [ValidateScript( {Test-Path -Path $PSItem})] I probably should have phrased my report better; it does as the setting name suggests insert whitespace before the open brace. However, the info with the setting says "Adds a space between a keyword and its associated scriptblock expression" and a parentheses isn't a keyword. So perhaps this is better described as a mismatch between the behavior indicated by the setting description and the actual behavior. |
Duplicate of #1468 |
This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes. |
Issue Description
I am experiencing a problem with... "Code Formatting: Whitespace Before Open Brace" is creating a space between a parenthesis and the open brace.
Attached Logs
Follow the instructions in the README about
capturing and sending logs.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: