docs(build): clarify PowerShellBuild bug-workaround status#32
Conversation
Three comment blocks in build.psake.ps1 referenced PowerShellBuild v0.7.3 bugs as "until bug is fixed" workarounds. Verified upstream status against PSB v0.8.0 (Feb 2026, latest) and updated the comments: 1. Coverage Threshold = 0 was framed as "until truncation bug is fixed." Reality: the truncation bug in Test-PSBuildPester.ps1:118 is display-only — the JaCoCo XML on disk has correct numbers and Codecov reads that. Threshold = 0 here is just to keep the local build from acting on the bogus 0% console display, the same "Codecov enforces threshold" pattern the upstream template uses. Reframed accordingly. 2. The custom ScriptAnalysis task (substitute for PSB's Test-PSBuildScriptAnalysis with its "$_Severity" typo) is still genuinely necessary — bug confirmed still in v0.8.0; no upstream fix PR open (only #106, which adds tests for the function). Updated version reference from 0.7.3 to v0.8.0 and noted the absence of a fix PR. No code change; just clarifying the rationale. Related to the multi-repo coverage-config alignment work in tablackburn/PowerShellModuleTemplate#19 and downstream PRs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughExpanded and clarified inline comments in ChangesBuild script comment updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@build.psake.ps1`:
- Around line 37-41: In the comment block referencing the built-in
PSScriptAnalyzer integration, replace shorthand terms: change "PSB" to
"PowerShellBuild" and "PR" to "pull request" (e.g., the lines starting with "#
Disable PSB's built-in..." and "# that silently misses findings — bug still
present..." in build.psake.ps1); keep the rest of the wording intact but expand
any other abbreviations found in that block to their full forms to comply with
the repository's documentation style rule.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Three comment blocks in
build.psake.ps1referenced PowerShellBuild v0.7.3 bugs as"until bug is fixed"workarounds. As part of a wider multi-repo coverage-config alignment effort (upstream PR #19 onPowerShellModuleTemplate), I checked the upstream status against PowerShellBuild v0.8.0 (Feb 2026, latest):Test-PSBuildPester.ps1:118—[Math]::Truncate(int / int)truncates sub-100% coverage to 0 on consoleThreshold = 0here is just preventing the local build from acting on the bogus 0% console display, which is the same"Codecov enforces threshold"pattern the upstream template uses.Test-PSBuildScriptAnalysis.ps1:32-34—$_Severitytypo (missing dot) that silently misses findingsWhy this is just a doc change
After checking upstream, the right move is Path A in the agreed scope: document the divergence rather than restructure. The custom
UnitTesttask (Integration test exclusion) and customScriptAnalysistask ($_Severity typo) are both load-bearing for separate reasons; aligning to the template's defaultTestwiring would require restructuring 17+ test files for marginal benefit.The truncation comment was the only actually-misleading framing — it implied the workaround would be removable if the bug got fixed, but really
Threshold = 0is the right value for this repo regardless of bug status (Codecov does the gating).Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit