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
- PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- Summarized changes
- Change is not breaking
- Make sure all
.cs,.ps1and.psm1files have the correct copyright header - Make sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentation
- This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:to the beginning of the title and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix