Commit 58d18d8
* style: align test scaffolding with canonical PSMTplt
Apply the three style rules from PowerShellModuleTemplate#23 to the
Help/Meta/MetaFixers test files this repo inherited from the template:
- Named parameters on multi-arg cmdlet calls (Split-Path, Join-Path,
Test-Path, Get-Module, Get-Content, Select-String, Get-TextFilesList,
Test-FileUnicode)
- ValidateNotNull / ValidateNotNullOrEmpty validators on mandatory
param entries in tests/MetaFixers.psm1
- Test-FileUnicode call inside Get-UnicodeFilesList now uses named
-FileInfo parameter
Also fixes a stale $parameterNames reference in the last Context block
of Help.tests.ps1 (should be $commandParameterNames). Bug bundled in
per the cross-repo audit.
tests/Manifest.tests.ps1 is the older Module Dependency variant
(no Test-VersionConstraint helper, -Child typo on Join-Path) and is
deferred to a separate uplift PR.
Behavior is unchanged.
* style: re-sync test scaffolding to post-#36 canonical template
PowerShellModuleTemplate#36 (merged after this branch opened) scoped the
named-parameter rule: name parameters only on calls passing two or more
arguments (a trailing switch counts); single-argument calls stay
positional. #36 explicitly calls out this PR as a consumer to re-sync.
Revert the over-naming on single-argument calls so these files match the
current canonical template:
- Help.tests.ps1: Import-PowerShellDataFile, Test-Path, Import-Module,
Get-Help, and global:FilterOutCommonParameters back to positional.
Split-Path -Path .. -Parent and Join-Path -Path .. -ChildPath stay
named (two-plus arguments).
- Meta.tests.ps1: Import-Module back to positional; Get-Content -Path
.. -Raw stays named (switch counts as an argument).
- MetaFixers.psm1: Test-FileUnicode call in Get-UnicodeFilesList back to
positional.
Kept: the four ValidateNotNull/ValidateNotNullOrEmpty validators (added
by template #23, not reverted by #36) and the comment-based-help
.EXAMPLE calls (#36 leaves these named for teaching clarity).
MetaFixers.psm1 and Meta.tests.ps1 are now byte-identical to upstream;
Help.tests.ps1 differs only in this repo's local divergences (the
Set-BuildEnvironment bootstrap and comment-based help). Behavior
unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* style: replace em-dashes with hyphens in Help.tests.ps1 comment
The two em-dashes (U+2014) in the local Set-BuildEnvironment comment
block were the sole non-ASCII content in the file, tripping
PSScriptAnalyzer's PSUseBOMForUnicodeEncodedFile rule. Replace them with
ASCII hyphens so the file is pure ASCII (matching the canonical template
files) and PSSA is clean without adding a BOM or a suppression.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 09b763f commit 58d18d8
3 files changed
Lines changed: 21 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
| 152 | + | |
| 153 | + | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
| 164 | + | |
| 165 | + | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
0 commit comments