style: add ValidateNotNullOrEmpty to build.ps1 -Task parameter#54
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
Tightens argument validation in the repository’s build entrypoint (build.ps1) so invalid task inputs fail during parameter binding rather than producing later psake errors.
Changes:
- Add
[ValidateNotNullOrEmpty()]to thebuild.ps1-Taskparameter to reject''and$nullinputs early.
💡 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