Skip to content

Add new code formatting preset "OTPS": OTBS with else on new line#2269

Open
o-l-a-v wants to merge 1 commit intoPowerShell:mainfrom
o-l-a-v:feat/add-new-formatting-preset
Open

Add new code formatting preset "OTPS": OTBS with else on new line#2269
o-l-a-v wants to merge 1 commit intoPowerShell:mainfrom
o-l-a-v:feat/add-new-formatting-preset

Conversation

@o-l-a-v
Copy link

@o-l-a-v o-l-a-v commented Mar 1, 2026

PR Summary

This PR adds a new code formatting preset, "OTPS" (One True PowerShell Style): OTBS with else on new line.

PR Context

Thoughts behind the name:

  • To mock the idea of one true formatting style, even though there are none.
  • We do ONE change from OTBS (else on new line), also in the name (change B with P).

Feature request:

Context:

@o-l-a-v
Copy link
Author

o-l-a-v commented Mar 1, 2026

@JustinGrote:

PowerShell/vscode-powershell#5109 (comment)

So a PR could be fairly straightforward to just add a new entry to the enum with the appropriate settings. Changing the switch to an exhausive pattern matching would also help catch any net-new issues.

Do you mean a default case could catch both Stroustrup and this new proposed style OTPS as have the same values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant