Title: PSUseConsistentWhitespace - Ability to ignore if in a line with multiple pipes · Issue #2162 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: PSUseConsistentWhitespace - Ability to ignore if in a line with multiple pipes · Issue #2162 · PowerShell/PSScriptAnalyzer
X Title: PSUseConsistentWhitespace - Ability to ignore if in a line with multiple pipes · Issue #2162 · PowerShell/PSScriptAnalyzer
Description: Summary of the new feature The various PSUseConsistentWhitespace rules have various issues that might never be solved: https://github.com/PowerShell/PSScriptAnalyzer/issues?q=is:issue state:open UseConsistentWhitespace sort:c...
Open Graph Description: Summary of the new feature The various PSUseConsistentWhitespace rules have various issues that might never be solved: https://github.com/PowerShell/PSScriptAnalyzer/issues?q=is:issue state:o...
X Description: Summary of the new feature The various PSUseConsistentWhitespace rules have various issues that might never be solved: https://github.com/PowerShell/PSScriptAnalyzer/issues?q=is:issue state:o...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2162
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PSUseConsistentWhitespace - Ability to ignore if in a line with multiple pipes","articleBody":"## Summary of the new feature\n\nThe various PSUseConsistentWhitespace rules have various issues that might never be solved:\n\n* \u003chttps://github.com/PowerShell/PSScriptAnalyzer/issues?q=is%3Aissue%20state%3Aopen%20UseConsistentWhitespace%20sort%3Acreated-desc>\n\nMy biggest issue is that I don't want it to touch one liners or multiliners like this:\n\n```pwsh\n(\n (\n Invoke-RestMethod -Method 'Get' -Uri 'https://api.github.com/repos/chocolatey/choco/releases'\n ) | Where-Object -Property 'prerelease' -NE $true\n).'tag_name' | Sort-Object -Property @{'Expression' = {[System.Version]$_}} -Descending | Select-Object -First 1\n```\n\nWhich becomes this:\n\n```pwsh\n(\n (\n Invoke-RestMethod -Method 'Get' -Uri 'https://api.github.com/repos/chocolatey/choco/releases'\n ) | Where-Object -Property 'prerelease' -NE $true\n).'tag_name' | Sort-Object -Property @{'Expression' = { [System.Version]$_ } } -Descending | Select-Object -First 1\n```\n\nIf I could tell PSScriptAnalyzer to ignore cases like that I'd be happy.\n\n## Current impact\n\nThis makes it so that I don't use the code formatting presets, and instead define all the rules manually and disable most of the PSUseConsistentWhitespace rules.\n\nSide note: Would be great with the ability to override built-in presets, so you don't have to specify all the rules.\n\n* 2017-03-07 \"Add ability to inherit settings\": \u003chttps://github.com/PowerShell/PSScriptAnalyzer/issues/791>\n* 2024-12-01 \"Code formatting preset - Add ability to override settings set by preset\": \u003chttps://github.com/PowerShell/vscode-powershell/issues/5109>\n\n## Proposed technical implementation details (optional)\n\nDon't know. Some ideas:\n\n* Ability to ignore if more than one pipe `| is found on the same line?\n\n## What is the latest version of PSScriptAnalyzer at the point of writing\n\nv1.24.0","author":{"url":"https://github.com/o-l-a-v","@type":"Person","name":"o-l-a-v"},"datePublished":"2026-03-07T13:43:00Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/2162"}
| 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:a053aa2f-83a0-2e5c-3c99-b2eaaa96f427 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE34:218437:20078A:2A6E38:6AFCE00D |
| html-safe-nonce | 08730292a5d754c82cda474a949c83af1fab772802db709c5d437fb981acf707 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTM0OjIxODQzNzoyMDA3OEE6MkE2RTM4OjZBRkNFMDBEIiwidmlzaXRvcl9pZCI6IjgzMDQzNjE2MTI2OTM1Mjg1ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 645c28d866875e1cebdc28f89723369373e297d43f255a35a9e107f763337cd5 |
| hovercard-subject-tag | issue:4038516035 |
| 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/2162/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b965269ad4112d9fa8418e536dc7ed0197984a8ce485bb379e0c6c1d688dc82c/PowerShell/PSScriptAnalyzer/issues/2162 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b965269ad4112d9fa8418e536dc7ed0197984a8ce485bb379e0c6c1d688dc82c/PowerShell/PSScriptAnalyzer/issues/2162 |
| og:image:alt | Summary of the new feature The various PSUseConsistentWhitespace rules have various issues that might never be solved: https://github.com/PowerShell/PSScriptAnalyzer/issues?q=is:issue state:o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | o-l-a-v |
| 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