You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
style: enforce quoted literals, named parameters, and parameter validation
The repo's own powershell.instructions.md mandates three rules for
in-tree code:
- literal string parameter values are single-quoted
- cmdlet calls use named parameters (when more than one arg is passed)
- every function parameter has an appropriate validator
This commit applies those rules to the template's first-party files —
the example public/private functions, the test scaffolding, the meta
helper modules, and build.ps1. Notable changes:
- build.ps1 gains [ValidateNotNullOrEmpty()] on $Task
- tests/MetaFixers.psm1 + tests/ManifestHelpers.psm1 gain validators
on every parameter that didn't already have one
- tests/Help.tests.ps1, tests/Manifest.tests.ps1, tests/Meta.tests.ps1
rename positional Split-Path / Join-Path / Get-Module / Get-Content
calls to use named -Path / -ChildPath / -Name / -Pattern parameters
- the example Get-{{Prefix}}Example.ps1 / its tests get the same
treatment so newly-scaffolded modules start out compliant
No behavioural changes. CI on the un-initialized template still skips
build/test (the {{GUID}} placeholder is unparseable until init runs);
parse-checks confirm every edited file is syntactically valid.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments