GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix PSUseConsistentIndentation.PipelineIndentation.None to not remove code when the previous line ended with a pipe by bergmeister · Pull Request #1746 · PowerShell/PSScriptAnalyzer Conversation
Collaborator
PR SummaryFixes #1580 by resetting the newline in the case of the first token after a pipeline and newline lands in the PR Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Christoph Bergmeister (bergmeister)
marked this pull request as ready for review
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for working on this Christoph Bergmeister (@bergmeister). I'm wondering if we need a few more tests? #1580 provided several examples, and also pointed out that this issue occurs with both I can spend some time to manually test this if you'd like and perhaps come up with more test coverage.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Yes, testing is always a challenge. It's a compromise between doing lots of integration tests or complex code and maintaining all the test cases if a change necessitates updating expectations. Definitely happy to add more test cases or something more complex, do you have something specific in mind? Otherwise my suggestions is to dog food the local build with this setting. PSScriptAnalyzer/Rules/UseConsistentIndentation.cs Lines 61 to 95 in 58c4423
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
With regards to the repro also working for 3, this is in fact the same setting, it is just the enum representation of it:
Gotcha! In that case, I'll defer to your judgement. Looks good to me!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
PSUseConsistentIndentation.PipelineIndentation.None or 3 deletes commandlet name
There was an error while loading. Please reload this page.