-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: regular expressions in ripgrep #8830
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
- only search for regex and no string
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.
1 issue found across 2 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="core/tools/definitions/grepSearch.ts">
<violation number="1" location="core/tools/definitions/grepSearch.ts:24">
The alternation example in the query description is missing the closing quote, so the illustrated pattern isn’t valid and can confuse users copying it.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
|
🎉 This PR is included in version 1.33.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.37.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Previously, none of the searches involving regex characters like * or | always produced empty results. Escaping the regex during
prepareQueryForRipgrepadded escaping characters\which were passed down to ripgrep. Ripgrep guide suggests the regular expression does not need escaping. If we need to search for exact string,-Fflag needs to used.resolves CON-4741
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Fixes ripgrep searches by treating queries as regex patterns and removing accidental escaping, so operators like |, * and character classes now work. Addresses CON-4741.
Written for commit b784015. Summary will update automatically on new commits.