Title: IgnoreOneLineBlock=$false Correction Issue in PSPlaceOpenBrace and PSPlaceCloseBrace · Issue #2218 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: IgnoreOneLineBlock=$false Correction Issue in PSPlaceOpenBrace and PSPlaceCloseBrace · Issue #2218 · PowerShell/PSScriptAnalyzer
X Title: IgnoreOneLineBlock=$false Correction Issue in PSPlaceOpenBrace and PSPlaceCloseBrace · Issue #2218 · PowerShell/PSScriptAnalyzer
Description: So far as I can tell, this hasn't been reported, but it is related to issue #2210 which I was also going to include. I've also gone through and applied the surfaced corrections one-by-one, which produces the exact same results in VS Code...
Open Graph Description: So far as I can tell, this hasn't been reported, but it is related to issue #2210 which I was also going to include. I've also gone through and applied the surfaced corrections one-by-one, which pr...
X Description: So far as I can tell, this hasn't been reported, but it is related to issue #2210 which I was also going to include. I've also gone through and applied the surfaced corrections one-by-one, ...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2218
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IgnoreOneLineBlock=$false Correction Issue in PSPlaceOpenBrace and PSPlaceCloseBrace","articleBody":"So far as I can tell, this hasn't been reported, but it *is* related to issue #2210 which I was also going to include. I've also gone through and applied the surfaced corrections one-by-one, which produces the exact same results in VS Code with the latest PowerShell extension (pre-release, 2026.1.2, which has PSScriptAnalyzer 1.25.0).\n\n## Steps to reproduce\nRun the following command:\n\n```powershell\nInvoke-Formatter -ScriptDefinition \"if (`$RegEx) { '-match' } else { '-like' }\" -Settings @{IncludeDefaultRules=$true;Rules=@{PSPlaceOpenBrace=@{Enable=$true;IgnoreOneLineBlock=$false;};PSPlaceCloseBrace=@{Enable=$true;IgnoreOneLineBlock=$false;}}}\n```\n\n## Expected behavior\n```powershell\nif ($RegEx) {\n '-match'\n} else {\n '-like'\n}\n```\n\n## Actual behavior\n```powershell\nif ($RegEx) {\n '-match' \n }\n else {\n '-like' \n }\n```\n\n## Environment data\n```powershell\n> $PSVersionTable\n\nName Value\n---- -----\nPSVersion 7.6.6\nPSEdition Core\nGitCommitId 7.6.6\nOS Microsoft Windows 10.0.22631\nPlatform Win32NT\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion 2.4\nSerializationVersion 1.1.0.1\nWSManStackVersion 3.0\n\n> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }\n\n1.25.0\n1.25.0\n```\n\n## The settings passed, a little easier to read, if needed.\n```powershell\n@{\n IncludeDefaultRules = $true\n Rules = @{\n PSPlaceOpenBrace = @{\n Enable = $true\n IgnoreOneLineBlock = $false\n }\n PSPlaceCloseBrace = @{\n Enable = $true\n IgnoreOneLineBlock = $false\n }\n }\n}\n```","author":{"url":"https://github.com/TMA-2","@type":"Person","name":"TMA-2"},"datePublished":"2026-09-25T19:17:42Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/2218"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:2031b1be-d7f5-abf5-c003-f5c73ecdc90c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D61A:2AABF1:137DE77:1B982E5:6AFCE223 |
| html-safe-nonce | 689957d2f930910e40e426d324887a1e6151a21b841dfbaaaa0626ae94c0d317 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjFBOjJBQUJGMToxMzdERTc3OjFCOTgyRTU6NkFGQ0UyMjMiLCJ2aXNpdG9yX2lkIjoiODUxMDE5NzY2MjY1NjI5MTM2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6bd8f57020f11cd97337b5257560ca2c5634229b2772959e46597227b3b5a8ac |
| hovercard-subject-tag | issue:5587407500 |
| 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/2218/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a2f3bde1dacb510210d069b8755cadb1848260e9b2be218989c1fafefd1ddbcb/PowerShell/PSScriptAnalyzer/issues/2218 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a2f3bde1dacb510210d069b8755cadb1848260e9b2be218989c1fafefd1ddbcb/PowerShell/PSScriptAnalyzer/issues/2218 |
| og:image:alt | So far as I can tell, this hasn't been reported, but it is related to issue #2210 which I was also going to include. I've also gone through and applied the surfaced corrections one-by-one, which pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TMA-2 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0c05b7eb5b95e29725d01bb1f560a020e3fafd0f033c6b9ed3918fa3161254dd |
| 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 | 79d9154e55368884c8c93766ba4fee076343d37f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width