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
- New [rule](RuleDocumentation/UseCompatibleCmdlets.md) to check cmdlet compatibility between different PowerShell flavors
4
+
- New [rule](RuleDocumentation/UseLiteralInitializerForHashtable.md) to warn when using Hashtable constructor
5
+
- Feature to [pass parameters to rules from settings file](RuleDocumentation/AvoidAlias.md)
6
+
- Feature to [discover settings file](README.md#settings-support-in-scriptanalyzer)
7
+
- Enhancement to [PSShouldProcess](RuleDocumentation/UseShouldProcessCorrectly.md) rule to check for ShouldProcess implementation in downstream functions
8
+
- A helper [module](Utils/RuleMaker.psm1) to create `C#` based builtin rules
9
+
10
+
### Fixed
11
+
- False negatives for identically named variables (#552)
12
+
- Passing `*Ast` arguments to external rules (#614)
13
+
14
+
### Changed
15
+
- PSShouldProcess rule to not check for presence of `ShouldContinue` when `SupportsShouldProcess` is declared
-[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)
21
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.
184
192
185
-
186
-
###Rules:
193
+
### Rules:
187
194
- New rule to validate the presence of deprecated module manifest fields.
188
-
- Removed PSAvoidTrapStatement rule from the builtin set – since this is not deprecated and using trap is a better choice in certain scenarios.
189
-
195
+
- Removed PSAvoidTrapStatement rule from the builtin set – since this is not deprecated and using trap is a better choice in certain scenarios.
190
196
191
-
###Fixes:
197
+
###Fixes:
192
198
- Verbose Message rule applies to only DSC cmdlet based resources.
193
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.
194
200
- PSAvoidUsingInternalsURLs to work with xPath expressions.
@@ -204,36 +210,30 @@ A big **Thank You!** to the following folks for making PSScriptAnalyzer even bet
204
210
- AvoidUsingPlainTextForPassword rule to be raised only strings or object types.
205
211
- Fix for PositionalParameterUsed method (Helper.cs) uses unsafe method to exclude ForEach-Object and Where-Object.
- Integrated with waffle.io for Project Management.
212
216
- Added documentation for writing script rules.
213
217
214
-
###Rules:
218
+
###Rules:
215
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.
216
220
- DSCTestsPresent rule: Resource module contains Tests folder with tests for given resource.
217
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.
218
222
219
-
###Fixes:
220
-
223
+
### Fixes:
221
224
- PSProvideVerboseMessage only throws warnings in non-advanced functions.
- Finalized three levels of Severity - Error/Warning/Information.
230
231
- Improved PSScriptAnalyzer engine behavior: emits non-terminating errors (Ex: for failed ast parse) and continues rule application when running on multiple scripts.
231
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.
232
233
- Added -Severity to Get-ScriptAnalyzerRules. Get-ScriptAnalyzer -Severity will filter rules based on the severity given.
233
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.
234
235
235
-
###Rules:
236
-
236
+
### Rules:
237
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:
238
238
+ UseStandardDSCFunctionsInResource
239
239
+ UseIdenticalParametersDSC
@@ -242,12 +242,9 @@ A big **Thank You!** to the following folks for making PSScriptAnalyzer even bet
242
242
- Added support in the engine to detect DSC configuration/resource files and disable default rule checkings on DSC configuration and resource files.
243
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.
244
244
245
-
246
-
###Fixes:
247
-
245
+
### Fixes:
248
246
- Improved heuristics to detect usage of Username and Password instead of PSCredential type.
249
247
- Improved accuracy in the detection of uninitialized variables.
250
248
- Improved error messages to include error line numbers and file names.
251
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.
252
250
- Fixed terminating errors including "Illegal characters in Path".
0 commit comments