-
-
Notifications
You must be signed in to change notification settings - Fork 18
fix: required parameter should not be empty #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request fixes an issue where required parameters (:param) were incorrectly matching empty values when followed by a path separator. The fix ensures that required parameters must contain at least one character.
Key Changes
- Added validation in
src/node.rsto reject empty values forKind::Normalparameters - Added comprehensive test coverage in
tests/issues.rsto verify the fix handles various edge cases - Enhanced documentation for the
Kindenum insrc/parser.rsto clarify parameter matching behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/issues.rs | New regression test (test_44) validating that required parameters reject empty values while optional parameters accept them |
| src/parser.rs | Added documentation explaining the purpose and behavior of path segment types |
| src/node.rs | Added early-return check to prevent Kind::Normal parameters from matching when followed immediately by / (indicating an empty parameter value) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.