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: drop named parameters from single-argument calls in test scaffolding
Apply the scoped named-parameter rule to the template's test scaffolding: name
parameters only on calls that pass two or more arguments; single-argument calls
stay positional. Reverts over-naming such as `Test-Path -Path $path` and
`Get-Module -Name $name` back to `Test-Path $path` / `Get-Module $name` across
the Help/Manifest/Meta tests, MetaFixers, and the Unit test templates.
Calls that genuinely pass two or more value arguments keep their names
(`Join-Path -Path -ChildPath`, `Get-Content -Path -Encoding -Raw`,
`Get-Command -Name -CommandType`), as does `Test-Path -LiteralPath` whose
positional slot binds to -Path and would change wildcard semantics.
This is the canonical-source fix for the over-naming that propagated into the
consumer test-scaffolding PRs; pairs with the rule scoping in
tablackburn/ai-agent-instruction-modules#25.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ own `CHANGELOG.md` (generated from `CHANGELOG.template.md` during init).
18
18
### Changed
19
19
20
20
- Renamed required PowerShell Gallery publish secret `PS_GALLERY_KEY` → `PSGALLERY_API_KEY` so the secret name matches the env var name PowerShellBuild reads (eliminating the previous mapping caveat). New modules created from the template after this change pick up the new name automatically. **Migration for existing modules:** create a new `PSGALLERY_API_KEY` repo secret with the same value, update `.github/workflows/PublishModuleToPowerShellGallery.yaml` to reference `secrets.PSGALLERY_API_KEY`, then delete the old `PS_GALLERY_KEY` secret.
21
+
- Test scaffolding (`tests/Help.tests.ps1`, `tests/Manifest.tests.ps1`, `tests/Meta.tests.ps1`, `tests/MetaFixers.psm1`, and the `tests/Unit/` templates) no longer names parameters on single-argument calls (e.g. `Test-Path $path`, `Get-Module $name`), matching the scoped named-parameter rule — name parameters only when a call passes two or more arguments. Calls with two or more value arguments (`Join-Path`, `Get-Content … -Encoding … -Raw`, `Get-Command -Name … -CommandType …`) and `Test-Path -LiteralPath` keep their names.
0 commit comments