style: add ValidateNotNullOrEmpty to build.ps1 -Task parameter#41
Conversation
Matches the canonical template (PowerShellModuleTemplate#23). Without the validator, `./build.ps1 -Task ''` and `./build.ps1 -Task $null` slip past parameter binding and produce confusing downstream errors from psake. The validator surfaces the misuse immediately.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR aims to improve the developer experience of the repository’s build entrypoint (build.ps1) by tightening parameter validation for the psake task selection, so misuse fails early with a clear parameter-binding error rather than later with confusing psake errors.
Changes:
- Adds
[ValidateNotNullOrEmpty()]to the-Taskparameter inbuild.ps1.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Adds
[ValidateNotNullOrEmpty()]to the$Taskparameter inbuild.ps1to match the canonical pattern from PowerShellModuleTemplate#23.Without the validator,
./build.ps1 -Task ''and./build.ps1 -Task$null` slip past parameter binding and produce confusing downstream errors from psake. The validator surfaces the misuse immediately.Test plan
./build.ps1still runs successfully (default'default'task)./build.ps1 -Task ''fails fast with a parameter-validation error🤖 Generated with Claude Code