-
Notifications
You must be signed in to change notification settings - Fork 512
Formatter issues with indenting when brace and paren present on same line #558
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
@jasnic02 Your guess is correct that the formatter is counting the paren and brace in calculating the indentation of the block. Couting a paren block ensures that something like a multi-line We didn't think of this particular case and thanks for pointing it out. |
#576 also raises the issue of not indenting nested closing paren/brace combination correctly. |
An option for OTBS would be great. |
Duplicate with #576 |
Thanks @DarkLite1! Yes, this looks like a duplicate. It will be fixed in the next version of PSScriptAnalyzer. Please see #576 for more info. |
System Details
$PSVersionTable
:Issue Description
Each open brace or paren on the same line is being counted as in indent trigger resulting in too many indents. ValidateScript is the best example:
becomes:
Note the closing '})]' is also indented. I believe the brace/paren characters should only be counted once for indent calculations if they are on the same line?
The text was updated successfully, but these errors were encountered: