Background
instructions/powershell.instructions.md mandates three rules for in-tree code:
- Literal string parameter values are single-quoted (e.g.,
-Method 'Post', not -Method Post)
- Cmdlet calls use named parameters (when more than one argument is passed) (e.g.,
Split-Path -Path $p -Parent, not Split-Path -Parent $p)
- Every function parameter has an appropriate validator (
[ValidateNotNullOrEmpty()], [ValidateRange], [ValidateSet], etc.)
These rules were applied to tablackburn/JsmOperations (PR #2) and the upstream tablackburn/PowerShellModuleTemplate (PR #23). This repo's first-party code hasn't been swept yet.
The recent line-ending normalization (PR #34) didn't touch the style rules above.
Scope
Apply the rules to:
build.ps1
- Module source (
ScheduledTasksManager/Public/*.ps1, ScheduledTasksManager/Private/*.ps1, ScheduledTasksManager/ScheduledTasksManager.psm1)
- First-party test files (the ones written for this module —
tests/*.Tests.ps1)
Out of scope
Template-derived files come from tablackburn/PowerShellModuleTemplate and are tracked separately:
tests/Help.tests.ps1
tests/Manifest.tests.ps1
tests/Meta.tests.ps1
tests/MetaFixers.psm1
tests/ManifestHelpers.psm1
tests/Integration/Start-IntegrationLab.ps1 is integration-test scaffolding — review separately.
Reference
tablackburn/JsmOperations#2 shows the canonical shape of these changes applied to a real module. The commits stacked on feature/v0.1.0-mvp walk through it (style sweep → naming refactor → expand-shorthand passes).
Acceptance criteria
- All in-scope style violations resolved
./build.ps1 still passes (PSScriptAnalyzer + Pester clean, coverage threshold preserved)
- Single-arg
Write-Verbose / Write-Output / etc. stay positional (the rule is "named unless only one parameter")
Background
instructions/powershell.instructions.mdmandates three rules for in-tree code:-Method 'Post', not-Method Post)Split-Path -Path $p -Parent, notSplit-Path -Parent $p)[ValidateNotNullOrEmpty()],[ValidateRange],[ValidateSet], etc.)These rules were applied to
tablackburn/JsmOperations(PR #2) and the upstreamtablackburn/PowerShellModuleTemplate(PR #23). This repo's first-party code hasn't been swept yet.The recent line-ending normalization (PR #34) didn't touch the style rules above.
Scope
Apply the rules to:
build.ps1ScheduledTasksManager/Public/*.ps1,ScheduledTasksManager/Private/*.ps1,ScheduledTasksManager/ScheduledTasksManager.psm1)tests/*.Tests.ps1)Out of scope
Template-derived files come from
tablackburn/PowerShellModuleTemplateand are tracked separately:tests/Help.tests.ps1tests/Manifest.tests.ps1tests/Meta.tests.ps1tests/MetaFixers.psm1tests/ManifestHelpers.psm1tests/Integration/Start-IntegrationLab.ps1is integration-test scaffolding — review separately.Reference
tablackburn/JsmOperations#2shows the canonical shape of these changes applied to a real module. The commits stacked onfeature/v0.1.0-mvpwalk through it (style sweep → naming refactor → expand-shorthand passes).Acceptance criteria
./build.ps1still passes (PSScriptAnalyzer + Pester clean, coverage threshold preserved)Write-Verbose/Write-Output/ etc. stay positional (the rule is "named unless only one parameter")