style: add ValidateNotNullOrEmpty to build.ps1 -Task parameter#17
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 |
There was a problem hiding this comment.
Pull request overview
Adds early parameter validation to build.ps1 so invalid -Task values fail fast during parameter binding instead of producing downstream psake errors.
Changes:
- Added
[ValidateNotNullOrEmpty()]to the-Taskparameter inbuild.ps1.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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