diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 72e099814..d1012064c 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,13 @@ -## [1.13.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.13.0) - 2017-05-18 +## [1.14.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.14.0) - 2017-06-09 + +### Added +- (#772) [`Invoke-Formatter`](https://github.com/PowerShell/PSScriptAnalyzer/blob/4f47ef95edd045029628ba9a4079b1dda19f080f/docs/markdown/Invoke-Formatter.md) cmdlet to format PowerShell scripts. The cmdlet takes a script string and a settings file and outputs formatted script string based on the provided settings. If no settings are provided, the formatter uses the default `CodeFormatting` settings, which can be found at `Settings/CodeFormatting.psd1`. + +### Fixed +- (#770) `PSUseIdenticalMandatoryParametersForDSC` rule violation extent. The violation extent covers only the relevant function name, which prior the fix would mark the entire script. This prevented rule suppression from working when the suppression is declared inside `Get/Set/Test` functions. +- (#770) `PSUseIdenticalMandatoryParametersForDSC` behavior to look for mandatory parameters in `Get/Set/Test` functions in a script based resource only if they are declared with attributes, `Key` or `Required`, in the corresponding `mof` file. + +## [1.13.0](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.13.0) - 2017-05-18 ### Added - [`PSUseSupportsShouldProcess`](https://github.com/PowerShell/PSScriptAnalyzer/blob/f92dabdef61b87d5f9f9f2140739c9f3f210b2d8/RuleDocumentation/UseSupportsShouldProcess.md) rule to discourage manual `whatif` and `confirm` parameter declarations. diff --git a/Engine/PSScriptAnalyzer.psd1 b/Engine/PSScriptAnalyzer.psd1 index 57aab3d82..9c25d9c73 100644 --- a/Engine/PSScriptAnalyzer.psd1 +++ b/Engine/PSScriptAnalyzer.psd1 @@ -11,7 +11,7 @@ Author = 'Microsoft Corporation' RootModule = 'PSScriptAnalyzer.psm1' # Version number of this module. -ModuleVersion = '1.13.0' +ModuleVersion = '1.14.0' # ID used to uniquely identify this module GUID = 'd6245802-193d-4068-a631-8863a4342a18' @@ -88,14 +88,11 @@ PrivateData = @{ IconUri = '' ReleaseNotes = @' ### Added -- `PSUseSupportsShouldProcess` rule to discourage manual `whatif` and `confirm` parameter declarations. -- Suggested corrections to `PSProvideCommentHelp` rule. The rule can now be configured to: - - trigger on non-exported functions. But by default, the rule triggers only on exported functions that do have comment help. - - place the suggested corrections either before a function definition, or at the beginning or end of a function's body. - - choose between block comment or line comment style of suggested comment help correction. +- (#772) `Invoke-Formatter` cmdlet to format PowerShell scripts. The cmdlet takes a script string and a settings file and outputs formatted script string based on the provided settings. If no settings are provided, the formatter uses the default `CodeFormatting` settings, which can be found at `Settings/CodeFormatting.psd1`. ### Fixed -- `PSAlignAssignmentStatement` to align assignment statements in DSC configurations that have *Undefined DSC Resource* parse errors. +- (#770) `PSUseIdenticalMandatoryParametersForDSC` rule violation extent. The violation extent covers only the relevant function name, which prior the fix would mark the entire script. This prevented rule suppression from working when the suppression is declared inside `Get/Set/Test` functions. +- (#770) `PSUseIdenticalMandatoryParametersForDSC` behavior to look for mandatory parameters in `Get/Set/Test` functions in a script based resource only if they are declared with attributes, `Key` or `Required`, in the corresponding `mof` file. '@ } } @@ -115,3 +112,5 @@ PrivateData = @{ + + diff --git a/Engine/project.json b/Engine/project.json index 39f7daaa8..2403557c6 100644 --- a/Engine/project.json +++ b/Engine/project.json @@ -1,6 +1,6 @@ { "name": "Microsoft.Windows.PowerShell.ScriptAnalyzer", - "version": "1.13.0", + "version": "1.14.0", "dependencies": { "System.Management.Automation": "6.0.0-alpha13" }, diff --git a/Rules/project.json b/Rules/project.json index e5f22f917..e40d2beff 100644 --- a/Rules/project.json +++ b/Rules/project.json @@ -1,9 +1,9 @@ { "name": "Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules", - "version": "1.13.0", + "version": "1.14.0", "dependencies": { "System.Management.Automation": "6.0.0-alpha13", - "Engine": "1.13.0", + "Engine": "1.14.0", "Newtonsoft.Json": "9.0.1" },