Skip to content

Commit e050eb3

Browse files
committed
Merge pull request #184 from PowerShell/ruleDocumentationForNewRule
Add rule documentation for new rule
2 parents 2e27554 + 0607a75 commit e050eb3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#AvoidUsingDeprecatedManifestFields
2+
**Severity Level: Warning**
3+
4+
5+
##Description
6+
7+
PowerShell V5.0 introduced some new fields and replaced some old fields with in module manifest files (.psd1). Therefore, fields such as "ModuleToProcess" is replaced with "RootModule". Using the deprecated manifest fields will result in PSScriptAnalyzer warnings.
8+
9+
##How to Fix
10+
11+
To fix a violation of this, please replace "ModuleToProcess" with "RootModule".
12+
13+
##Example
14+
15+
Wrong:
16+
```
17+
ModuleToProcess ='psscriptanalyzer'
18+
19+
ModuleVersion = '1.0'
20+
```
21+
22+
Correct:
23+
```
24+
RootModule ='psscriptanalyzer'
25+
26+
ModuleVersion = '1.0'
27+
```

0 commit comments

Comments
 (0)