Problem description
Three low-priority cleanups noticed during review of #560:
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.
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.
- 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.
Problem description
Three low-priority cleanups noticed during review of #560:
throwstyle inconsistency. The new Plaster v1/v2 fallback inSampler/Public/Add-Sample.ps1andSampler/Public/New-SamplerPipeline.ps1uses a plain stringthrow. Sampler elsewhere uses$script:localizedData+ a structuredErrorRecord, and the newpublic-functions.instructions.md/private-functions.instructions.mdprescribe that style.FeaturesValidateSetcasing. The list mixes casing deliberately (Enum,Classes,git,gitversion,github,vscode,codecov,azurepipelines,Gherkin,UnitTests,ModuleQuality,Build,AppVeyor,TestKitchen). PowerShell binding and-containsin the manifest are case-insensitive, so it works, but the asymmetry is ugly and invites typos in downstream contributions.tests/Integration/PlasterTemplates/Sampler/CustomModulePlasterTemplate.Integration.Tests.ps1lost 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
ErrorRecordthrows with localized messages.ValidateSetand manifest<choice value="...">entries.#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.