◐ Shell
clean mode source ↗

Fix 'Accept pipeline input' properties in documentation of Invoke-Formatter by bergmeister · Pull Request #1833 · PowerShell/PSScriptAnalyzer

Conversation

@bergmeister

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

sdwheeler

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

JamesWTruher

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 :-)

JamesWTruher

Labels