Skip to content

Minor cleanups after PR #560 (throw style, Features casing, stray whitespace) #566

@raandree

Description

@raandree

Problem description
Three low-priority cleanups noticed during review of #560:

  1. throw style inconsistency. The new Plaster v1/v2 fallback in Sampler/Public/Add-Sample.ps1 and Sampler/Public/New-SamplerPipeline.ps1 uses a plain string throw. Sampler elsewhere uses $script:localizedData + a structured ErrorRecord, and the new public-functions.instructions.md / private-functions.instructions.md prescribe that style.
  2. Features ValidateSet casing. The list mixes casing deliberately (Enum, Classes, git, gitversion, github, vscode, codecov, azurepipelines, Gherkin, UnitTests, ModuleQuality, Build, AppVeyor, TestKitchen). PowerShell binding and -contains in the manifest are case-insensitive, so it works, but the asymmetry is ugly and invites typos in downstream contributions.
  3. Stray whitespace. tests/Integration/PlasterTemplates/Sampler/CustomModulePlasterTemplate.Integration.Tests.ps1 lost a space before a trailing comment: Features = 'git'# All,Enum,Classes,....

Verbose logs
N/A

How to reproduce
Read the files listed above.

Expected behavior

  • Structured ErrorRecord throws with localized messages.
  • Consistent casing across ValidateSet and manifest <choice value="..."> entries.
  • Space before # comment.

Current behavior
Plain-string throw; mixed casing; missing space before #.

Suggested solution
Address each item in a single small cleanup PR; none of them are urgent.

Operating system the target node is running
N/A

PowerShell version and build the target node is running
N/A

Module version used
Sampler Unreleased / post-#560.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions