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

PipelineIndentationStyle: Fix edge case where pipeline was incorrectly detected to span mutliple lines due to backticks in the command leading up to the pipeline #1312

Merged

Conversation

bergmeister
Copy link
Collaborator

PR Summary

Fixes #1311 by refining the logic to determine if a pipeline spans one line or not. Previously it compared only the StartLineNumber of the first and last pipeline to be equal. Now the logic needs to be tweaked with an OR condition where also the EndLineNumber of the first and last pipeline is checked for equality.
Code was also made more readable.

PR Checklist

Rules/UseConsistentIndentation.cs Outdated Show resolved Hide resolved
Rules/UseConsistentIndentation.cs Outdated Show resolved Hide resolved
Co-Authored-By: Robert Holt <rjmholt@gmail.com>
@bergmeister bergmeister merged commit 171c81d into PowerShell:master Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants