Fix 'Accept pipeline input' properties in documentation of Invoke-Formatter by bergmeister · Pull Request #1833 · PowerShell/PSScriptAnalyzer
Conversation
PR Summary
PR #1763 made Invoke-Formatter accept pipeline input but tests didn't catch that cmdlet docs weren't updated. This fixes the docs and adds tests for pipeline input. Since that pull request hasn't been released yet, no need to update Microsoft docs.
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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| foreach($parameterAttribute in $parameter.Attributes) { | ||
| if ($parameterAttribute.ValueFromPipeline -eq $null) { continue } | ||
|
|
||
| $parameterHelpPipelineInput = if ($parameterHelp.pipelineInput -eq 'True (ByPropertyName, ByValue)') { |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the string format of this going to be consistent
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes and if not the test will fail anyway :-)
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