X Tutup
The Wayback Machine - https://web.archive.org/web/20200918095140/https://github.com/PowerShell/PSScriptAnalyzer/pull/1191
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting regression in 1.18.0 whereby single-line pipeline reduces indentation level incorrectly #1191

Conversation

@bergmeister
Copy link
Collaborator

bergmeister commented Mar 24, 2019

PR Summary

Fixes #1187 by excluding single-line pipelines to avoid reduce indentation level incorrectly. This case showed up only when there is already some indentation.

PR Checklist

…rrectly (problem only showed up when there was already existing indentation due to ClipNegative
Rules/UseConsistentIndentation.cs Outdated Show resolved Hide resolved
Rules/UseConsistentIndentation.cs Show resolved Hide resolved
Rules/UseConsistentIndentation.cs Show resolved Hide resolved
Rules/UseConsistentIndentation.cs Show resolved Hide resolved
Co-Authored-By: bergmeister <c.bergmeister@gmail.com>
@bergmeister
Copy link
Collaborator Author

bergmeister commented Mar 25, 2019

I applied the suggestions, I have to look at the test failures though, locally it was fine.

Copy link
Member

JamesWTruher left a comment

it looks like this isn't quite right based on test failures

@JamesWTruher JamesWTruher requested review from rjmholt and JamesWTruher Mar 26, 2019
bergmeister added 2 commits Mar 27, 2019
…nalyzer into FixUseConsistentIndentationBugWithSingleLinePipeline
…oop and not switch statement), simple mistake
@bergmeister
Copy link
Collaborator Author

bergmeister commented Mar 27, 2019

@rjmholt @JamesWTruher @TylerLeonhardt I fixed the build, it was a simple mistake, I used a break statement when I actually meant to use a continue statement.

@bergmeister bergmeister merged commit 8389997 into PowerShell:development Mar 28, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.
X Tutup