Title: PSUseConsistentIndentation not respected for pipeline chain operators. · Issue #2120 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: PSUseConsistentIndentation not respected for pipeline chain operators. · Issue #2120 · PowerShell/PSScriptAnalyzer
X Title: PSUseConsistentIndentation not respected for pipeline chain operators. · Issue #2120 · PowerShell/PSScriptAnalyzer
Description: When using natural line continuation with IncreaseIndentationForFirstPipeline (or IncreaseIndentationAfterEveryPipeline) enabled and pipeline chain operators, it does not format as expected like with regular pipeline operators. Before su...
Open Graph Description: When using natural line continuation with IncreaseIndentationForFirstPipeline (or IncreaseIndentationAfterEveryPipeline) enabled and pipeline chain operators, it does not format as expected like wi...
X Description: When using natural line continuation with IncreaseIndentationForFirstPipeline (or IncreaseIndentationAfterEveryPipeline) enabled and pipeline chain operators, it does not format as expected like wi...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2120
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PSUseConsistentIndentation not respected for pipeline chain operators.","articleBody":"When using natural line continuation with IncreaseIndentationForFirstPipeline (or IncreaseIndentationAfterEveryPipeline) enabled and pipeline chain operators, it does not format as expected like with regular pipeline operators.\n\n\nBefore submitting a bug report:\n\n- Make sure you are able to repro it on the latest released version\n- Perform a quick search for existing issues to check if this bug has already been reported\n\nSteps to reproduce\n------------------\n\n```PowerShell\n$scriptDefinition = @'\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\"\n'@\n\n$settings = @{\n IncludeRules = @(\"PSUseConsistentIndentation\")\n Rules = @{\n PSUseConsistentIndentation = @{\n Enable = $true\n IndentationSize = 4\n PipelineIndentation = 'IncreaseIndentationForFirstPipeline'\n Kind = 'space'\n }\n }\n}\n\nInvoke-Formatter -ScriptDefinition $scriptDefinition -Settings $settings\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\"\n```\n\nExpected behavior\n-----------------\n\n```none\n$scriptDefinition = @'\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\"\n'@\n\n$settings = @{\n IncludeRules = @(\"PSUseConsistentIndentation\")\n Rules = @{\n PSUseConsistentIndentation = @{\n Enable = $true\n IndentationSize = 4\n PipelineIndentation = 'IncreaseIndentationForFirstPipeline'\n Kind = 'space'\n }\n }\n}\n\nInvoke-Formatter -ScriptDefinition $scriptDefinition -Settings $settings\nGet-Item \"C:\\someItem\" \u0026\u0026\n Get-Item \"C:\\someItem\" \u0026\u0026\n Get-Item \"C:\\someItem\"\n```\n\nActual behavior\n---------------\n\n```none\n$scriptDefinition = @'\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\"\n'@\n\n$settings = @{\n IncludeRules = @(\"PSUseConsistentIndentation\")\n Rules = @{\n PSUseConsistentIndentation = @{\n Enable = $true\n IndentationSize = 4\n PipelineIndentation = 'IncreaseIndentationForFirstPipeline'\n Kind = 'space'\n }\n }\n}\n\nInvoke-Formatter -ScriptDefinition $scriptDefinition -Settings $settings\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\" \u0026\u0026\nGet-Item \"C:\\someItem\"\n```\n\nIf an unexpected error was thrown then please report the full error details using e.g. `$error[0] | Select-Object *`\n\nEnvironment data\n----------------\n\n\u003c!-- Provide the output of the following 2 commands --\u003e\n\n```PowerShell\n\u003e $PSVersionTable\nName Value\n---- -----\nPSVersion 7.4.11\nPSEdition Core\nGitCommitId 7.4.11\nOS Microsoft Windows 10.0.19045\nPlatform Win32NT\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion 2.3\nSerializationVersion 1.1.0.1\nWSManStackVersion 3.0\n\u003e (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }\n1.24.0\n1.22.0\n```\n","author":{"url":"https://github.com/BrandonLake","@type":"Person","name":"BrandonLake"},"datePublished":"2025-08-11T21:25:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2120/PSScriptAnalyzer/issues/2120"}
| 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:ff48aa80-dcab-b409-1200-dd5974447ffe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD02:26AEF0:172E337:1F5AA84:696EAD27 |
| html-safe-nonce | 1a6d800aface3ab394d4b2d2b1d300676ce44a0eb70cd8d74bef14783d538a43 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDAyOjI2QUVGMDoxNzJFMzM3OjFGNUFBODQ6Njk2RUFEMjciLCJ2aXNpdG9yX2lkIjoiNDg0MTE5NDMxOTI4MTgyNzExMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d299a96c92567976b4e56cd88e233e63d48354083efd6f8f7f7cb4461842a630 |
| hovercard-subject-tag | issue:3311716162 |
| 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/2120/issue_layout |
| twitter:image | https://opengraph.githubassets.com/64715089164b13b86b3960408c27cb0e439e7cd9a5a15e886c200c8157c77cbb/PowerShell/PSScriptAnalyzer/issues/2120 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/64715089164b13b86b3960408c27cb0e439e7cd9a5a15e886c200c8157c77cbb/PowerShell/PSScriptAnalyzer/issues/2120 |
| og:image:alt | When using natural line continuation with IncreaseIndentationForFirstPipeline (or IncreaseIndentationAfterEveryPipeline) enabled and pipeline chain operators, it does not format as expected like wi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BrandonLake |
| 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