Skip to content

Add rule documentation for new rule #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions RuleDocumentation/AvoidUsingDeprecatedManifestFields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#AvoidUsingDeprecatedManifestFields
**Severity Level: Warning**


##Description

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other manifest properties that were deprecated? Also were they deprecated in PS v 3.0?

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.

##How to Fix

To fix a violation of this, please replace "ModuleToProcess" with "RootModule".

##Example

Wrong:
```
ModuleToProcess ='psscriptanalyzer'

ModuleVersion = '1.0'
```

Correct:
```
RootModule ='psscriptanalyzer'

ModuleVersion = '1.0'
```