From 137b88a8cddf796e609d1e5f2644475636500440 Mon Sep 17 00:00:00 2001 From: Yuting Chen Date: Fri, 24 Apr 2015 14:20:44 -0700 Subject: [PATCH 1/2] Add ChangLog to reflect changes in the development process --- CHANGELOG.MD | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CHANGELOG.MD diff --git a/CHANGELOG.MD b/CHANGELOG.MD new file mode 100644 index 000000000..6b7c54a72 --- /dev/null +++ b/CHANGELOG.MD @@ -0,0 +1,28 @@ +##Unreleased (Apr.24, 2015) + +###Features: +- Finalized three levels of Severity - Error/Warning/Information. +- Improved PSScriptAnalyzer engine behavior: emits non-terminating errors (Ex: for failed ast parse) and continues rule application when running on multiple scripts. +- Added wild card supports for rules in Invoke-ScriptAnalyzer. Eg. Invoke-ScriptAnalyzer -IncludeRule PSAvoid* will apply all rules starting with PSAvoid* in built in rule assemblies. +- Added -Severity to Get-ScriptAnalyzerRules. Get-ScriptAnalyzer -Severity will filter rules based on the severity given. +- 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. + +###Rules: + +- 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: + + UseStandardDSCFunctionsInResource + + UseIdenticalParametersDSC + + UseIdenticalMandatoryParametersDSC + + ReturnCorrectTypesForDSCFunctions +- Added support in the engine to detect DSC configuration/resource files and disable default rule checkings on DSC configuration and resource files. +- UseShouldProcessForStateChangingFunctions - If an advanced function has Verbs like New/Start/Stop/Restart/Reset/Set- that will change system state, it should support ShouldProcess attribute. +- AvoidUsingWMIObjectCmdlet - For PowerShell 3.0 and above, usage of WMIObject is not recommended. This rule is to detect WMIObject usage in scripts that are written for PS 3.0 and above. + +###Fixes: + +- Improved heuristics to detect usage of Username and Password instead of PSCredential type. +- Improved accuracy in the detection of uninitialized variables. +- Improved error messages to include error line numbers and file names. +- 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. +- Fixed terminating errors including "Illegal characters in Path". +- Fixed the issue where display properties in output are not consistent with the object properties. \ No newline at end of file From fce5e415b4a0dbefd353515204179cb4f63c5f0b Mon Sep 17 00:00:00 2001 From: "Yuting Chen[MSFT]" Date: Thu, 7 May 2015 14:26:16 -0700 Subject: [PATCH 2/2] Update CHANGELOG.MD New changelog for the upcoming release --- CHANGELOG.MD | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6b7c54a72..1602860be 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,9 +1,27 @@ -##Unreleased (Apr.24, 2015) +## Unreleased (May.7, 2015) +###Features: +- Integrated with waffle.io for Project Management. +- Added documentation for writing script rules. + +###Rules: +- 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. +- DSCTestsPresent rule: Resource module contains Tests folder with tests for given resource. +- 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. + +###Fixes: + +- PSProvideVerboseMessage only throws warnings in non-advanced functions. +- Fix the issue in importing customized rule + + + + +##Relesed on Apr.24, 2015 ###Features: - Finalized three levels of Severity - Error/Warning/Information. - Improved PSScriptAnalyzer engine behavior: emits non-terminating errors (Ex: for failed ast parse) and continues rule application when running on multiple scripts. -- Added wild card supports for rules in Invoke-ScriptAnalyzer. Eg. Invoke-ScriptAnalyzer -IncludeRule PSAvoid* will apply all rules starting with PSAvoid* in built in rule assemblies. +- 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. - Added -Severity to Get-ScriptAnalyzerRules. Get-ScriptAnalyzer -Severity will filter rules based on the severity given. - 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. @@ -16,7 +34,7 @@ + ReturnCorrectTypesForDSCFunctions - Added support in the engine to detect DSC configuration/resource files and disable default rule checkings on DSC configuration and resource files. - UseShouldProcessForStateChangingFunctions - If an advanced function has Verbs like New/Start/Stop/Restart/Reset/Set- that will change system state, it should support ShouldProcess attribute. -- AvoidUsingWMIObjectCmdlet - For PowerShell 3.0 and above, usage of WMIObject is not recommended. This rule is to detect WMIObject usage in scripts that are written for PS 3.0 and above. + ###Fixes: @@ -25,4 +43,4 @@ - Improved error messages to include error line numbers and file names. - 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. - Fixed terminating errors including "Illegal characters in Path". -- Fixed the issue where display properties in output are not consistent with the object properties. \ No newline at end of file +