diff --git a/docs/Rules/README.md b/docs/Rules/README.md index e695e7039..aec9ff777 100644 --- a/docs/Rules/README.md +++ b/docs/Rules/README.md @@ -55,7 +55,7 @@ The PSScriptAnalyzer contains the following rule definitions. | [ReservedCmdletChar](./ReservedCmdletChar.md) | Error | Yes | | | [ReservedParams](./ReservedParams.md) | Error | Yes | | | [ReviewUnusedParameter](./ReviewUnusedParameter.md) | Warning | Yes | | -| [ShouldProcess](./ShouldProcess.md) | Error | Yes | | +| [ShouldProcess](./ShouldProcess.md) | Warning | Yes | | | [UseApprovedVerbs](./UseApprovedVerbs.md) | Warning | Yes | | | [UseBOMForUnicodeEncodedFile](./UseBOMForUnicodeEncodedFile.md) | Warning | Yes | | | [UseCmdletCorrectly](./UseCmdletCorrectly.md) | Warning | Yes | | diff --git a/docs/Rules/ShouldProcess.md b/docs/Rules/ShouldProcess.md index 5e83e3544..93fae667d 100644 --- a/docs/Rules/ShouldProcess.md +++ b/docs/Rules/ShouldProcess.md @@ -14,7 +14,7 @@ title: ShouldProcess If a cmdlet declares the `SupportsShouldProcess` attribute, then it should also call `ShouldProcess`. A violation is any function which either declares `SupportsShouldProcess` attribute but makes no calls to `ShouldProcess` or it calls `ShouldProcess` but does not declare -`SupportsShouldProcess` +`SupportsShouldProcess`. For more information, see the following articles: @@ -26,7 +26,7 @@ For more information, see the following articles: To fix a violation of this rule, please call `ShouldProcess` method when a cmdlet declares `SupportsShouldProcess` attribute. Or please add `SupportsShouldProcess` attribute argument when -calling `ShouldProcess` +calling `ShouldProcess`. ## Example @@ -66,10 +66,5 @@ function Set-File { $Content | Out-File -FilePath $Path } - else - { - # Code that should be processed if doing a WhatIf operation - # Must NOT change anything outside of the function / script - } } ```