Skip to content

Commit d77965e

Browse files
Apply suggestions from code review
Co-authored-by: Christoph Bergmeister <[email protected]>
1 parent d1e5564 commit d77965e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Rules/UseSingleValueFromPipelineParameter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string file
5858
// and then group them by parameter set name.
5959
//
6060
//
61-
// https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parameter_sets?#reserved-parameter-set-name
61+
// https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parameter_sets?#reserved-parameter-set-name
6262
//
6363
// The default parameter set name is '__AllParameterSets'.
6464
// Not specifying a parameter set name and using the parameter

docs/Rules/UseSingleValueFromPipelineParameter.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: UseSingleValueFromPipelineParameter
1111
## Description
1212

1313
Parameter sets should have at most one parameter marked as
14-
`ValueFromPipeline=true`.
14+
`ValueFromPipeline = true`.
1515

1616
This rule identifies functions where multiple parameters within the same
1717
parameter 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

Comments
 (0)