FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

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

Fix edge case when PipelineIndentationStyle is not set to NoIndentation - #1261

Merged
Christoph Bergmeister (bergmeister) merged 3 commits into
PowerShell:masterfrom
bergmeister:FixIndentation_WherePipelineIsOnSameLineButNotFollowingExpression
Jul 8, 2019
Merged

Fix edge case when PipelineIndentationStyle is not set to NoIndentation#1261
Christoph Bergmeister (bergmeister) merged 3 commits into
PowerShell:masterfrom
bergmeister:FixIndentation_WherePipelineIsOnSameLineButNotFollowingExpression

Conversation

Christoph Bergmeister (bergmeister) commented Jun 15, 2019
edited by rjmholt
Loading

Copy link
Copy Markdown
Collaborator

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

…aseIndentationForFirstPipeline 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

Rob Holt (rjmholt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fix looks good to me

Comment thread Rules/UseConsistentIndentation.cs Outdated

Copy link
Copy Markdown

Anything blocking this?

Copy link
Copy Markdown
Collaborator Author

No, I just addressed the variable name suggestion. Sometimes I also wait a bit for James Truher (@JamesWTruher) to double check it as well. Otherwise we are good to go I think

Copy link
Copy Markdown

Is 21 days enough time? :)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Closing brace of if block is deindented if block contains a pipe

4 participants


Back | FazBrowse Home | New Git URL