Skip to content

Commit 67dbc2c

Browse files
committed
Updated PSProvideDefaultParameterValue Rules
1 parent fdd1198 commit 67dbc2c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Tests/Rules/ProvideDefaultParameterValue.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
[string]
77
$Param1
88
)
9+
$Param1
10+
$Param1 = "test"
911
}
1012

1113
function BadFunc2($Param1)
1214
{
15+
$Param1
1316
}

Tests/Rules/ProvideDefaultParameterValueNoViolations.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111

1212
function GoodFunc2($Param1 = $null)
1313
{
14+
$Param1
1415
}

0 commit comments

Comments
 (0)