From 7cdc9b5ffddcb91118e2deb464cf2172387bb211 Mon Sep 17 00:00:00 2001 From: Roman Kuzmin Date: Tue, 17 Sep 2024 16:17:02 +0100 Subject: [PATCH] Add `Problem` to validate sets of `OutputOutcome`, fix #2542 (#2543) Co-authored-by: Bernie White --- docs/CHANGELOG-v3.md | 2 ++ src/PSRule/PSRule.psm1 | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG-v3.md b/docs/CHANGELOG-v3.md index 72e60f99ac..acbb98980b 100644 --- a/docs/CHANGELOG-v3.md +++ b/docs/CHANGELOG-v3.md @@ -67,6 +67,8 @@ What's changed since pre-release v3.0.0-B0203: [#1860](https://github.com/microsoft/PSRule/issues/1860) - Fixed aggregation of reasons with `$Assert.AnyOf()` by @BernieWhite. [#1829](https://github.com/microsoft/PSRule/issues/1829) + - Added `Problem` to validate sets of `OutputOutcome` by @nightroman + [#2542](https://github.com/microsoft/PSRule/issues/2542) ## v3.0.0-B0203 (pre-release) diff --git a/src/PSRule/PSRule.psm1 b/src/PSRule/PSRule.psm1 index 6c4f49a547..efc8092666 100644 --- a/src/PSRule/PSRule.psm1 +++ b/src/PSRule/PSRule.psm1 @@ -1309,7 +1309,7 @@ function New-PSRuleOption { # Sets the Output.Outcome option [Parameter(Mandatory = $False)] - [ValidateSet('None', 'Fail', 'Pass', 'Error', 'Processed', 'All')] + [ValidateSet('None', 'Fail', 'Pass', 'Error', 'Problem', 'Processed', 'All')] [Alias('Outcome')] [PSRule.Rules.RuleOutcome]$OutputOutcome = 'Processed', @@ -1612,7 +1612,7 @@ function Set-PSRuleOption { # Sets the Output.Outcome option [Parameter(Mandatory = $False)] - [ValidateSet('None', 'Fail', 'Pass', 'Error', 'Processed', 'All')] + [ValidateSet('None', 'Fail', 'Pass', 'Error', 'Problem', 'Processed', 'All')] [Alias('Outcome')] [PSRule.Rules.RuleOutcome]$OutputOutcome = 'Processed', @@ -2376,7 +2376,7 @@ function SetOptions { # Sets the Output.Outcome option [Parameter(Mandatory = $False)] - [ValidateSet('None', 'Fail', 'Pass', 'Error', 'Processed', 'All')] + [ValidateSet('None', 'Fail', 'Pass', 'Error', 'Problem', 'Processed', 'All')] [Alias('Outcome')] [PSRule.Rules.RuleOutcome]$OutputOutcome = 'Processed',