Brace Formatting in foreach loop

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
PsCustomObject
Posts: 80
Joined: Tue Apr 29, 2014 1:55 am

Brace Formatting in foreach loop

Post by PsCustomObject » Fri Jun 21, 2019 5:16 am

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.

User avatar
mxtrinidad
Site Admin
Posts: 315
Joined: Sun Mar 03, 2013 12:42 pm

Re: Brace Formatting in foreach loop

Post by mxtrinidad » Fri Jun 21, 2019 6:16 am

We are investigating and will get back to you soon.
Thanks for reporting your issue.

User avatar
mxtrinidad
Site Admin
Posts: 315
Joined: Sun Mar 03, 2013 12:42 pm

Re: Brace Formatting in foreach loop

Post by mxtrinidad » Fri Jun 21, 2019 6:36 am

We are working to resolved the issue. The fix will be included in our next service release.
Sorry for any inconvenience!