Title: [Formatter] Do not force indentation style unless certain line length were met · Issue #2148 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: [Formatter] Do not force indentation style unless certain line length were met · Issue #2148 · PowerShell/PSScriptAnalyzer
X Title: [Formatter] Do not force indentation style unless certain line length were met · Issue #2148 · PowerShell/PSScriptAnalyzer
Description: Prerequisites I have written a descriptive issue title. I have searched all issues to ensure it has not already been requested. Summary Formatter always format code as the specified indent style no matter how long the statement is: # bef...
Open Graph Description: Prerequisites I have written a descriptive issue title. I have searched all issues to ensure it has not already been requested. Summary Formatter always format code as the specified indent style no...
X Description: Prerequisites I have written a descriptive issue title. I have searched all issues to ensure it has not already been requested. Summary Formatter always format code as the specified indent style no...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2148
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Formatter] Do not force indentation style unless certain line length were met","articleBody":"### Prerequisites\n\n- [x] I have written a descriptive issue title.\n- [x] I have searched all [issues](https://github.com/PowerShell/PowerShellEditorServices/issues?q=is%3Aissue) to ensure it has not already been requested.\n\n### Summary\n\nFormatter always format code as the specified indent style no matter how long the statement is:\n\n```ps1\n# before\n$foo = if ($true) {1} else {0}\n\n# after \n$foo = if ($true) {\n 1\n} else {\n 0\n}\n\n# expected\n$foo = if ($true) { 1 } else { 0 }\n```\n\nThe code became too sparse by being enforced to the indentation style.\n\n### Proposed Design\n\n_No response_","author":{"url":"https://github.com/sharpchen","@type":"Person","name":"sharpchen"},"datePublished":"2025-12-11T14:25:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2148/PSScriptAnalyzer/issues/2148"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bdac7eef-178b-4ca8-1951-e879c9e4bafd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93C8:AADCD:1786BC5:1FC1698:696EACF2 |
| html-safe-nonce | 7dfa0bd989027d39ff70d6fa01e77b7c8d911e7d156544c61cd14562a2cab479 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0M4OkFBRENEOjE3ODZCQzU6MUZDMTY5ODo2OTZFQUNGMiIsInZpc2l0b3JfaWQiOiI4ODA3MjUyNjEwNDcyMTMyOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | da4ad1c3b7db6a31b71b9f743d416a63a6de4773aec67348e20245546d8b7ab4 |
| hovercard-subject-tag | issue:3758552214 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PSScriptAnalyzer/2148/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6aa9d949628ee2cb7a558037fad239e88d844191e7c86bf1521646dcd2719d91/PowerShell/PSScriptAnalyzer/issues/2148 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6aa9d949628ee2cb7a558037fad239e88d844191e7c86bf1521646dcd2719d91/PowerShell/PSScriptAnalyzer/issues/2148 |
| og:image:alt | Prerequisites I have written a descriptive issue title. I have searched all issues to ensure it has not already been requested. Summary Formatter always format code as the specified indent style no... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sharpchen |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width