GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@o-l-a-v

@o-l-a-v Olav Rønnestad Birkeland (o-l-a-v) commented Mar 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Edit: Blocked, see PowerShell/PSScriptAnalyzer#2045 (comment).

PR Summary

  • Linked PR in PSSA: Add new code formatting preset "OTPS": OTBS with else on new line PSScriptAnalyzer#2158
  • Linked PR in vscode-powershell that can be merged after this and the PR to PSSA: Add new code formatting preset "OTPS": OTBS with else on new line vscode-powershell#5413

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:

  • New formatting preset: OTBS with else on a new line PSScriptAnalyzer#2045

Context:

  • "There is no One True Brace Style": There is no One True Brace Style PoshCode/PowerShellPracticeAndStyle#177
    • About OTBS with else on a new line:
      • There is no One True Brace Style PoshCode/PowerShellPracticeAndStyle#177 (comment)
      • There is no One True Brace Style PoshCode/PowerShellPracticeAndStyle#177 (comment)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@o-l-a-v
feat: added new code formatting preset OTPS
4beacd7
This was referenced Mar 1, 2026
Add new code formatting preset "OTPS": OTBS with else on new line PowerShell/vscode-powershell#5413
Draft
Add new code formatting preset "OTPS": OTBS with else on new line PowerShell/PSScriptAnalyzer#2158
Draft
@o-l-a-v

Olav Rønnestad Birkeland (o-l-a-v) commented Mar 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Author

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@o-l-a-v
Olav Rønnestad Birkeland (o-l-a-v) marked this pull request as draft March 7, 2026 12:33
@andyleejordan Andy Jordan (andyleejordan) added Issue-Enhancement A feature request (enhancement). Area-Code Formatting labels Jun 16, 2026

This branch has not been deployed

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

Reviewers

Copilot code review Copilot
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

Labels

Area-Code Formatting Issue-Enhancement A feature request (enhancement).

Projects

None yet

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.

2 participants

@o-l-a-v @andyleejordan
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.