-
Notifications
You must be signed in to change notification settings - Fork 1
[Claude Test run] Implement matches_regex assertion types #18
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
- Add matches_regex and not_matches_regex to AssertionType enum in parser.zig - Add string parsing support for both regex types in fromString method - Implement basic regex matcher with support for: - .* (any characters) - ^ (start anchor) and $ (end anchor) - . (any single character) - [abc] (character classes) - Literal text matching - Add assertion checking logic for both regex types in assertion_checker.zig - Add comprehensive test case for regex functionality Co-authored-by: Brad <[email protected]>
|
Claude finished @bradcypert's task —— View job Code Review CompleteTodo List:
Overall AssessmentThis PR implements a functional regex matching system for HTTP assertions. The implementation is clean and integrates well with the existing codebase, but there are several important considerations for a production system. 👍 Strengths
|
bradcypert
left a comment
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.
@claude we shouldn't hand roll out own regex implementation. It's unfortunate that zig doesn't offer this in its standard library, let's use a 3rd party one for now.
|
Claude finished @bradcypert's task —— View job ✅ Task CompleteSuccessfully replaced the hand-rolled regex implementation with a 3rd party library as requested. Todo List:
Changes Made:🔧 Dependencies:
🚀 Code Improvements:
🛡️ Security Benefits:
📈 Maintainability:
The implementation maintains the same API ( Commit: |
- Add zig-regex dependency to build.zig.zon and build.zig - Replace custom matchesRegex() and matchesRegexAt() functions with library call - Simplify implementation from 94 lines to 10 lines - Improve security by removing potential ReDoS vulnerabilities - Use proper memory management with ArenaAllocator 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Brad <[email protected]>
Implements
matches_regexandnot_matches_regexassertion types in parser.zig to allow for regex-based assertions.Changes
matches_regexandnot_matches_regexto AssertionType enumCloses #10
Generated with Claude Code