Page 1 of 1

Brace Formatting in foreach loop

Posted: Fri Jun 21, 2019 5:16 am
by PsCustomObject
Product: PowerShell Studio 2019 (64 Bit)
Build: v5.6.165
OS: Windows 10 Enterprise (64 Bit)
32 or 64 bit OS: 64

Hello,

it seems that the fix deployed in the latest version for Formatting option not working correctly introduced an issue withe formatting, I have configured IDE to put braces on a new line and this works very well but for the foreach loop.

Code: Select all

foreach ($u in $us) {
	
}
I have tested this and seems to work with If and while loops but the foreach one leaves the brace on the same line.

Thanks in advance for looking into this.

Re: Brace Formatting in foreach loop

Posted: Fri Jun 21, 2019 6:16 am
by mxtrinidad
We are investigating and will get back to you soon.
Thanks for reporting your issue.

Re: Brace Formatting in foreach loop

Posted: Fri Jun 21, 2019 6:36 am
by mxtrinidad
We are working to resolved the issue. The fix will be included in our next service release.
Sorry for any inconvenience!