Title: PSAlignAssignmentStatement returns SuggestedCorrections with wrong format · Issue #2201 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: PSAlignAssignmentStatement returns SuggestedCorrections with wrong format · Issue #2201 · PowerShell/PSScriptAnalyzer
X Title: PSAlignAssignmentStatement returns SuggestedCorrections with wrong format · Issue #2201 · PowerShell/PSScriptAnalyzer
Description: Steps to reproduce Trigger a rule violation of PSAlignAssignmentStatement with unaligned assignments: "@{`n test = 1`n test2 = 2`n}" | Set-Content -Path test.ps1 Invoke-ScriptAnalyzer -Path ./test.ps1 -Settings CodeFormattingOTBS | Selec...
Open Graph Description: Steps to reproduce Trigger a rule violation of PSAlignAssignmentStatement with unaligned assignments: "@{`n test = 1`n test2 = 2`n}" | Set-Content -Path test.ps1 Invoke-ScriptAnalyzer -Path ./test....
X Description: Steps to reproduce Trigger a rule violation of PSAlignAssignmentStatement with unaligned assignments: "@{`n test = 1`n test2 = 2`n}" | Set-Content -Path test.ps1 Invoke-ScriptAnalyzer -Pa...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2201
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PSAlignAssignmentStatement returns SuggestedCorrections with wrong format","articleBody":"Steps to reproduce\n------------------\n\nTrigger a rule violation of PSAlignAssignmentStatement with unaligned assignments:\n\n```PowerShell\n\"@{`n test = 1`n test2 = 2`n}\" | Set-Content -Path test.ps1\nInvoke-ScriptAnalyzer -Path ./test.ps1 -Settings CodeFormattingOTBS | Select-Object -ExpandProperty SuggestedCorrections\n```\n\nExpected behavior\n-----------------\n\nLike all other rules, the `CorrectionExtent` object should have the file path as `File` property and the correction description as `Description` property.\n\n```none\nFile : /path/to/test.ps1\nDescription : Assignment statements are not aligned\nStartLineNumber : 2\nStartColumnNumber : 9\nEndLineNumber : 2\nEndColumnNumber : 10\nText : \nLines : { }\nStart : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position\nEnd : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position\n```\n\nActual behavior\n---------------\n\nInstead, `Description` is null and `File` contains the description.\n\n```none\nFile : Assignment statements are not aligned\nDescription : \nStartLineNumber : 2\nStartColumnNumber : 9\nEndLineNumber : 2\nEndColumnNumber : 10\nText : \nLines : { }\nStart : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position\nEnd : Microsoft.Windows.PowerShell.ScriptAnalyzer.Position\n```\n\nEnvironment data\n----------------\n\n```PowerShell\n> $PSVersionTable\n\nName Value\n---- -----\nPSVersion 7.6.2\nPSEdition Core\nGitCommitId 7.6.2\nOS Ubuntu 24.04.4 LTS\nPlatform Unix\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\n```\n","author":{"url":"https://github.com/teanup","@type":"Person","name":"teanup"},"datePublished":"2026-08-08T11:25:30Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/2201"}
| 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:787e0628-7e0f-d86a-6cd4-2424639c6b55 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D998:2CE118:18F21F1:22FA7A2:6AFCFABC |
| html-safe-nonce | d4c0751b5ec17e9e3193622804f0e923b883980586fdacdc9e294bd07b1d7ab1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTk4OjJDRTExODoxOEYyMUYxOjIyRkE3QTI6NkFGQ0ZBQkMiLCJ2aXNpdG9yX2lkIjoiNzEyNDgzMjUxNTEwNTAyODc5NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a414565afa0670ed2c10fca2499465f0981bf9dd26d964267e59d2b507f2ba5a |
| hovercard-subject-tag | issue:5097284272 |
| 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/2201/issue_layout |
| twitter:image | https://opengraph.githubassets.com/86aa9f7aff5394217fecb8443f71d6762925d361ece7048753ca42af826f8cb1/PowerShell/PSScriptAnalyzer/issues/2201 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/86aa9f7aff5394217fecb8443f71d6762925d361ece7048753ca42af826f8cb1/PowerShell/PSScriptAnalyzer/issues/2201 |
| og:image:alt | Steps to reproduce Trigger a rule violation of PSAlignAssignmentStatement with unaligned assignments: "@{`n test = 1`n test2 = 2`n}" | Set-Content -Path test.ps1 Invoke-ScriptAnalyzer -Path ./test.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | teanup |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfabad6ee26d2b84c7afef4ae0cc71b8b692fb9d66f9f15997652ef991bfd3f4 |
| 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 | 35f85b78676038389558a41adf8d76e474592ede |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width