Skip to content

Commit 0ace603

Browse files
author
Kapil Borle
committed
Update ProvideCommentHelp rule documentation
1 parent dc4e6f0 commit 0ace603

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

RuleDocumentation/ProvideCommentHelp.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,49 @@ Comment based help should be provided for all PowerShell commands. This test onl
88

99
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).
1010

11-
## How
11+
## Configuration
1212

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.
1454

1555
## Example
1656

0 commit comments

Comments
 (0)