You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RuleDocumentation/ProvideCommentHelp.md
+42-2
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,49 @@ Comment based help should be provided for all PowerShell commands. This test onl
8
8
9
9
For assistance on comment based help, use the command ```Get-Help about_comment_based_help``` or the article, "How to Write Cmdlet Help" (http://go.microsoft.com/fwlink/?LinkID=123415).
10
10
11
-
## How
11
+
## Configuration
12
12
13
-
Include comment based help for each command identified.
13
+
```powershell
14
+
Rules = @{
15
+
PSProvideCommentHelp = @{
16
+
Enable = $true
17
+
ExportedOnly = $false
18
+
BlockComment = $true
19
+
VSCodeSnippetCorrection = $false
20
+
Placement = "before"
21
+
}
22
+
}
23
+
```
24
+
25
+
### Parameters
26
+
27
+
#### Enable: bool (Default valus is `$true`)
28
+
29
+
Enable or disable the rule during ScriptAnalyzer invocation.
30
+
31
+
#### ExportedOnly: bool (Default value is `$true`)
32
+
33
+
If enabled, throw violation only on functions/cmdlets that are exported using the 'Export-ModuleMember' cmdlet.
34
+
35
+
#### BlockComment: bool (Default value is `$true`)
36
+
37
+
If enabled, returns comment help in block comment style, i.e., `<#...#>`. Otherwise returns
38
+
comment help in line comment style, i.e., each comment line starts with `#`.
39
+
40
+
#### VSCodeSnippetCorrection: bool (Default value is `$false`)
41
+
42
+
If enabled, returns comment help in vscode snippet format.
43
+
44
+
#### Placement: string (Default value is `before`)
45
+
46
+
Represents the position of comment help with respect to the function definition.
47
+
48
+
Possible values are: `before`, `begin` and `end`. If any invalid value is given, the
49
+
property defaults to `before`.
50
+
51
+
`before` means the help is placed before the function definition.
52
+
`begin` means the help is placed at the begining of the function definition body.
53
+
`end` means the help is places the end of the function definition body.
0 commit comments