File tree 2 files changed +3
-8
lines changed
2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ The PSScriptAnalyzer contains the following rule definitions.
55
55
| [ ReservedCmdletChar] ( ./ReservedCmdletChar.md ) | Error | Yes | |
56
56
| [ ReservedParams] ( ./ReservedParams.md ) | Error | Yes | |
57
57
| [ ReviewUnusedParameter] ( ./ReviewUnusedParameter.md ) | Warning | Yes | |
58
- | [ ShouldProcess] ( ./ShouldProcess.md ) | Error | Yes | |
58
+ | [ ShouldProcess] ( ./ShouldProcess.md ) | Warning | Yes | |
59
59
| [ UseApprovedVerbs] ( ./UseApprovedVerbs.md ) | Warning | Yes | |
60
60
| [ UseBOMForUnicodeEncodedFile] ( ./UseBOMForUnicodeEncodedFile.md ) | Warning | Yes | |
61
61
| [ UseCmdletCorrectly] ( ./UseCmdletCorrectly.md ) | Warning | Yes | |
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ title: ShouldProcess
14
14
If a cmdlet declares the ` SupportsShouldProcess ` attribute, then it should also call
15
15
` ShouldProcess ` . A violation is any function which either declares ` SupportsShouldProcess ` attribute
16
16
but makes no calls to ` ShouldProcess ` or it calls ` ShouldProcess ` but does not declare
17
- ` SupportsShouldProcess `
17
+ ` SupportsShouldProcess ` .
18
18
19
19
For more information, see the following articles:
20
20
@@ -26,7 +26,7 @@ For more information, see the following articles:
26
26
27
27
To fix a violation of this rule, please call ` ShouldProcess ` method when a cmdlet declares
28
28
` SupportsShouldProcess ` attribute. Or please add ` SupportsShouldProcess ` attribute argument when
29
- calling ` ShouldProcess `
29
+ calling ` ShouldProcess ` .
30
30
31
31
## Example
32
32
@@ -66,10 +66,5 @@ function Set-File
66
66
{
67
67
$Content | Out-File -FilePath $Path
68
68
}
69
- else
70
- {
71
- # Code that should be processed if doing a WhatIf operation
72
- # Must NOT change anything outside of the function / script
73
- }
74
69
}
75
70
```
You can’t perform that action at this time.
0 commit comments