@@ -11,7 +11,7 @@ title: UseSingleValueFromPipelineParameter
1111## Description
1212
1313Parameter sets should have at most one parameter marked as
14- ` ValueFromPipeline= true ` .
14+ ` ValueFromPipeline = true ` .
1515
1616This rule identifies functions where multiple parameters within the same
1717parameter set have ` ValueFromPipeline ` set to ` true ` (either explicitly or
@@ -32,10 +32,10 @@ function Process-Data {
3232 [CmdletBinding()]
3333 param(
3434 [Parameter(ValueFromPipeline)]
35- [string]$InputData,
35+ [string] $InputData,
3636
3737 [Parameter(ValueFromPipeline)]
38- [string]$ProcessingMode
38+ [string] $ProcessingMode
3939 )
4040
4141 process {
@@ -52,10 +52,10 @@ function Process-Data {
5252 [CmdletBinding()]
5353 param(
5454 [Parameter(ValueFromPipeline)]
55- [string]$InputData,
55+ [string] $InputData,
5656
5757 [Parameter(Mandatory)]
58- [string]$ProcessingMode
58+ [string] $ProcessingMode
5959 )
6060 process {
6161 Write-Output "$ProcessingMode`: $InputData"
@@ -73,10 +73,10 @@ function Process-Data {
7373 [CmdletBinding()]
7474 param(
7575 [Parameter(ValueFromPipeline, ParameterSetName='MyParameterSet')]
76- [string]$InputData,
76+ [string] $InputData,
7777
7878 [Parameter(ValueFromPipeline, ParameterSetName='MyParameterSet')]
79- [string]$ProcessingMode
79+ [string] $ProcessingMode
8080 )
8181 process {
8282 Write-Output "$ProcessingMode`: $InputData"
@@ -92,8 +92,8 @@ For the default parameter set, use `'default'` as the suppression target:
9292
9393## Notes
9494
95- - This rule applies to both explicit ` ValueFromPipeline= $true ` and implicit
96- ` ValueFromPipeline ` (which is the same as using ` =$true ` )
95+ - This rule applies to both explicit ` ValueFromPipeline = $true ` and implicit
96+ ` ValueFromPipeline ` (which is the same as using ` = $true ` )
9797- Parameters with ` ValueFromPipeline=$false ` are not flagged by this rule
9898- The rule correctly handles the default parameter set (` __AllParameterSets ` )
9999 and named parameter sets
0 commit comments