Summary
Both Test-FeatureFlag and Test-Condition always return [bool] but neither declares an [OutputType()] attribute nor a .OUTPUTS help block. For functions whose entire purpose is to return a boolean that gates behavior, this is a missing piece of the public contract.
Files
Gatekeeper/Public/Test-FeatureFlag.ps1
Gatekeeper/Public/Test-Condition.ps1
Fix
Add to each function:
function Test-FeatureFlag {
[CmdletBinding()]
[OutputType([bool])]
param (
...
)
<#
.OUTPUTS
System.Boolean
Returns $true if an Allow rule matches, $false otherwise.
#>
Then regenerate the external help XML with PlatyPS so the ## OUTPUTS section in the .md files is populated.
Notes
- Good first issue
- Found by Brent Tlackburn and Shawn Wee!-ler
Summary
Both
Test-FeatureFlagandTest-Conditionalways return[bool]but neither declares an[OutputType()]attribute nor a.OUTPUTShelp block. For functions whose entire purpose is to return a boolean that gates behavior, this is a missing piece of the public contract.Files
Gatekeeper/Public/Test-FeatureFlag.ps1Gatekeeper/Public/Test-Condition.ps1Fix
Add to each function:
Then regenerate the external help XML with PlatyPS so the
## OUTPUTSsection in the.mdfiles is populated.Notes