GeezerVison is showing github.com — Add new code formatting preset "OTPS": OTBS with `else` on new line by o-l-a-v · Pull Request #2269 · PowerShell/PowerShellEditorServices
Conversation
Edit: Blocked, see PowerShell/PSScriptAnalyzer#2045 (comment).
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:
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Mar 1, 2026
|
Justin Grote (@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?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Reviewers
Copilot will automatically review once the pull request is marked ready for review
At least 1 approving review is required to merge this pull request.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.