We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a848091 + 8e1b187 commit b8d4d6bCopy full SHA for b8d4d6b
RuleDocumentation/ProvideDefaultParameterValue.md
@@ -0,0 +1,30 @@
1
+#ProvideDefaultParameterValue
2
+**Severity Level: Warning**
3
+
4
5
+##Description
6
+Parameters must have a default value as uninitialized parameters will lead to potential bugs in the scripts.
7
8
+##How to Fix
9
10
+To fix a violation of this rule, please specify a default value for all parameters.
11
12
+##Example
13
14
+Wrong:
15
16
+```
17
+function Test($Param1)
18
+{
19
+ $Param1
20
+}
21
22
23
+Correct:
24
25
26
+function Test($Param1 = $null)
27
28
29
30
0 commit comments