You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[June Blender (@juneb)](https://github.com/PowerShell/PSScriptAnalyzer/commits/development?author=juneb): Add tests for module help [058f65e1](https://github.com/PowerShell/PSScriptAnalyzer/commit/058f65e1f6278222378fedf444eecb2e32865b1e)
38
37
-[Shayde Nofziger (@Blackbaud-ShaydeNofziger)](https://github.com/PowerShell/PSScriptAnalyzer/commits/development?author=Blackbaud-ShaydeNofziger): Fix rule name typo and comment [PR #560](https://github.com/PowerShell/PSScriptAnalyzer/pull/560)
- Perf improvements in the Engine to execute rules concurrently.
201
192
202
-
203
-
###Rules:
193
+
### Rules:
204
194
- New rule to validate the presence of deprecated module manifest fields.
205
-
- Removed PSAvoidTrapStatement rule from the builtin set – since this is not deprecated and using trap is a better choice in certain scenarios.
195
+
- Removed PSAvoidTrapStatement rule from the builtin set – since this is not deprecated and using trap is a better choice in certain scenarios.
206
196
207
-
208
-
###Fixes:
197
+
### Fixes:
209
198
- Verbose Message rule applies to only DSC cmdlet based resources.
210
199
- Multiple fixes to AvoidUninitializedVariable to work with non-mandatory parameters, fix in the flow graphs for throw statements; support for missing preference variables; support for automatic variables.
211
200
- PSAvoidUsingInternalsURLs to work with xPath expressions.
@@ -221,36 +210,30 @@ A big **Thank You!** to the following folks for making PSScriptAnalyzer even bet
221
210
- AvoidUsingPlainTextForPassword rule to be raised only strings or object types.
222
211
- Fix for PositionalParameterUsed method (Helper.cs) uses unsafe method to exclude ForEach-Object and Where-Object.
- Integrated with waffle.io for Project Management.
229
216
- Added documentation for writing script rules.
230
217
231
-
###Rules:
218
+
###Rules:
232
219
- AvoidUsingWMICmdlet rule: For PowerShell 3.0 and above, usage of WMI cmdlets is not recommended. This rule is to detect WMI cmdlet usage in scripts that are written for PS 3.0 and above.
233
220
- DSCTestsPresent rule: Resource module contains Tests folder with tests for given resource.
234
221
- UseOutputTypeCorrectly rule: If we can identify the type of an object that is outputted to the pipeline by a cmdlet, then that type must be listed in the OutputType attribute.
235
222
236
-
###Fixes:
237
-
223
+
### Fixes:
238
224
- PSProvideVerboseMessage only throws warnings in non-advanced functions.
- Finalized three levels of Severity - Error/Warning/Information.
247
231
- Improved PSScriptAnalyzer engine behavior: emits non-terminating errors (Ex: for failed ast parse) and continues rule application when running on multiple scripts.
248
232
- Added wild card supports for rules in Invoke-ScriptAnalyzer and Get-ScriptAnalyzer. Eg. Invoke-ScriptAnalyzer -IncludeRule PSAvoid* will apply all rules starting with PSAvoid* in built in rule assemblies.
249
233
- Added -Severity to Get-ScriptAnalyzerRules. Get-ScriptAnalyzer -Severity will filter rules based on the severity given.
250
234
- Added Suppression functionality. Users are now able to specify suppression on certain parts of the scripts by specifying "SupressMessageAttribute" in the scripts. More details and documentations will be coming soon in blog posts. Also comes with this feature is the ability for users to display a list of suppressed messages.
251
235
252
-
###Rules:
253
-
236
+
### Rules:
254
237
- Added DSC Rules for resources including Parameter validation, Usage of standard DSC functions and return type validation. Rule checkings also support for DSC classes. Built-in DSC rules include:
255
238
+ UseStandardDSCFunctionsInResource
256
239
+ UseIdenticalParametersDSC
@@ -259,12 +242,9 @@ A big **Thank You!** to the following folks for making PSScriptAnalyzer even bet
259
242
- Added support in the engine to detect DSC configuration/resource files and disable default rule checkings on DSC configuration and resource files.
260
243
- UseShouldProcessForStateChangingFunctions - If an advanced function has Verbs like New/Start/Stop/Restart/Reset/Set- that will change system state, it should support ShouldProcess attribute.
261
244
262
-
263
-
###Fixes:
264
-
245
+
### Fixes:
265
246
- Improved heuristics to detect usage of Username and Password instead of PSCredential type.
266
247
- Improved accuracy in the detection of uninitialized variables.
267
248
- Improved error messages to include error line numbers and file names.
268
249
- Identified usage of PSBound parameters and PowerShell supplied variables such as $MyInvocation to avoid unnecessary noise in the results returned by some of the built-in rules.
269
250
- Fixed terminating errors including "Illegal characters in Path".
Copy file name to clipboardExpand all lines: RuleDocumentation/UseShouldProcessCorrectly.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ If a cmdlet declares the `SupportsShouldProcess` attribute, then it should also
7
7
For more information, please refer to `about_Functions_Advanced_Methods` and `about_Functions_CmdletBindingAttribute`
8
8
9
9
##How to Fix
10
-
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`.
10
+
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`
0 commit comments