PipelineIndentationStyle: Fix edge case where pipeline was incorrectly detected to span mutliple lines due to backticks in the command leading up to the pipeline by bergmeister · Pull Request #1312 · PowerShell/PSScriptAnalyzer
PowerShell / PSScriptAnalyzer Public
-
Notifications
You must be signed in to change notification settings - Fork 409
Merged
merged 4 commits into
Conversation
bergmeister
commented
Aug 17, 2019
bergmeister
commented
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
- 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
bergmeister added 3 commits
This was referenced
bergmeister
requested review from
JamesWTruher and
rjmholt
bergmeister
added
Area - Formatter
Issue - Bug
labels
rjmholt
approved these changes
Rules/UseConsistentIndentation.cs Outdated
Rules/UseConsistentIndentation.cs Outdated
Co-Authored-By: Robert Holt <rjmholt@gmail.com>
bergmeister
merged commit
171c81d
into
PowerShell:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment