-
Notifications
You must be signed in to change notification settings - Fork 8
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
route method regex explained #2
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request adds comments to explain the regex pattern used in the route method. The changes focus on providing a detailed explanation of each component of the regex, improving code readability and understanding. File-Level Changes
Tips
|
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.
Hey @Lucas-lufa - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider consolidating the regex comments into a single, more comprehensive explanation of the regex's purpose in the routing mechanism, rather than explaining individual syntax elements.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟡 Documentation: 1 issue found
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
// /is the start and end of regex pattern | ||
// \escapes the curly brace, making it a regular character, it's looking for it. | ||
// parenthesis is the capturing group | ||
// . is any character that is not a newline | ||
// + is one or more proceeding elements | ||
// ? lazy making match as few characters as possible |
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.
suggestion (documentation): Consider condensing the regex explanation comments
While the detailed explanation is helpful, it might be more concise to combine some of these comments. For example: '// / marks regex start/end, \ escapes {, (.+?) captures any chars (non-greedy)'
// /is the start and end of regex pattern | |
// \escapes the curly brace, making it a regular character, it's looking for it. | |
// parenthesis is the capturing group | |
// . is any character that is not a newline | |
// + is one or more proceeding elements | |
// ? lazy making match as few characters as possible | |
// / marks regex start/end, \ escapes {, (.+?) captures any chars (non-greedy) | |
// () is capturing group, . any char except newline, + one or more, ? lazy match |
Put in comments to explain what the regex in the route method is doing
Summary by Sourcery
Add explanatory comments to the regex pattern in the route method to clarify its functionality.
Documentation: