Skip to content

docs: fix broken examples in comment-based help #38

@HeyItsGilbert

Description

@HeyItsGilbert

Summary

Several comment-based help examples reference wrong parameter names, non-existent functions, or have syntax errors. These examples are imported into the external help XML and shipped to users.

Broken Examples

Public/Test-FeatureFlag.ps1

  • Calls Get-DeviceContext which does not exist in this module (should be Get-DefaultContext)
  • Passes '' (empty string) as the -FeatureFlag argument — won't resolve to anything
  • Omits -PropertySet which is required for meaningful evaluation
  • Example should also show pipeline usage: Read-FeatureFlag ... | Test-FeatureFlag ...

Public/Test-Condition.ps1

  • Uses -Properties — the correct parameter name is -PropertySet
  • Passes $rules[0] (a Rule object) to -Condition which expects a ConditionGroup; should be $flag.Rules[0].Conditions

Public/Get-DefaultContext.ps1

  • Uses -Properties — correct name is -PropertySet

Public/Read-FeatureFlag.ps1

  • Unclosed single quote: Read-FeatureFlag -FilePath 'MyFeature.json (missing closing ')

docs/en-US/Test-Condition.md

  • Inherits the wrong -Properties parameter name from the source file

docs/en-US/New-Rule.md

  • Example passes two ConditionGroup objects comma-separated to a [ConditionGroup] (singular) parameter

Notes

  • Found by Shawn Wee!-ler

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions