Skip to content

fix: suppress PSUseApprovedVerbs for Build-PSModule#12

Merged
yfridelance merged 3 commits into
developfrom
fix/pssa-approved-verbs
Feb 26, 2026
Merged

fix: suppress PSUseApprovedVerbs for Build-PSModule#12
yfridelance merged 3 commits into
developfrom
fix/pssa-approved-verbs

Conversation

@yfridelance
Copy link
Copy Markdown
Owner

Summary

  • Build is not an officially approved PowerShell verb, causing PSScriptAnalyzer to warn on Build-PSModule (only triggered in PS 5.1 PSSA version)
  • Added PSUseApprovedVerbs to the excluded rules in PSScriptAnalyzerSettings.psd1
  • The verb is intentional and well-understood in the module-building context

Test plan

  • PS 5.1 CI job passes PSScriptAnalyzer without warnings

🤖 Generated with Claude Code

yfridelance and others added 3 commits February 26, 2026 17:00
'Build' is not in the official PS approved verbs list, causing
PSScriptAnalyzer to warn on Build-PSModule in PowerShell 5.1.
The verb is intentional and well-understood in this context.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Join-Path with 3+ positional arguments is a PS 7+ feature. In PS 5.1
this caused a terminating error in the BeforeAll of the 'Missing
directories' context, cascading to all subsequent contexts (9 failures).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New-ModuleManifest in PS 5.1 does not generate the Prerelease field
in the PSData section. The test BeforeEach now detects this and
injects 'Prerelease = ''' into the PSData section before the closing
brace, ensuring the tests work on both PS 5.1 and PS 7+.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yfridelance yfridelance merged commit 0114afd into develop Feb 26, 2026
4 checks passed
@yfridelance yfridelance deleted the fix/pssa-approved-verbs branch February 26, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant