◐ Shell
clean mode source ↗

Fix edge case when PipelineIndentationStyle is not set to NoIndentation by bergmeister · Pull Request #1261 · PowerShell/PSScriptAnalyzer

PR Summary

Fixes #1236
Note that the originally reported issue was fixed in 1.18.1 but the issue creator posted another edge case after the release here, which is the issue that the author addresses.

When PipelineIndentationStyle is set to IncreaseIndentationForFirstPipeline or IncreaseIndentationAfterEveryPipeline:
The determination if the pipelineAst is on one line needs to be tweaked to include the case where pipelines are on the same line but a multi-line expressions follows. This lead to the next brace having one level of indentation too little.

Context: 1.18.1 fixed most PipelineIndentationStyle bugs when it is not set to NoIndentation (which is the default in VS Code at the moment), but this edge case was missed out.

Linux failure is due to the recent AppVeyor image update and affects development branch as well

PR Checklist