Skip to content

Commit 8258436

Browse files
Update Rules/ReviewUnusedParameter.cs
Co-authored-by: Andy Jordan <[email protected]>
1 parent 06141fc commit 8258436

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Rules/ReviewUnusedParameter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
126126
);
127127
// If the parameter has the ValueFromPipeline attribute and the scriptblock has a process block with
128128
// $_ or $PSItem usage, then the parameter is considered used
129-
if (valueFromPipeline?.GetValue() == true && hasProcessBlockWithPSItemOrUnderscore)
129+
if (valueFromPipeline?.GetValue() && hasProcessBlockWithPSItemOrUnderscore)
130+
130131
{
131132
continue;
132133
}

0 commit comments

Comments
 (0)