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 LICENSE NUMBERS, ACTIVATION 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.
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
PsCustomObject
Posts: 137
Last visit: Mon Mar 18, 2024 3:11 am

Brace Formatting in foreach loop

Post 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.
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Brace Formatting in foreach loop

Post by mxtrinidad »

We are investigating and will get back to you soon.
Thanks for reporting your issue.
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Brace Formatting in foreach loop

Post by mxtrinidad »

We are working to resolved the issue. The fix will be included in our next service release.
Sorry for any inconvenience!
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.