Skip to content

Conversation

@waynexia
Copy link
Member

In case a|b|c will become ^a|b|c$ instead of ^(a|b|c)$

@waynexia waynexia requested review from Copilot and v0y4g3r May 16, 2025 11:09
Copy link

Copilot AI left a 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 PR ensures that regex patterns are properly grouped and fully anchored by wrapping the inner regex with parentheses.

  • Updates test cases in src/parser/parse.rs to use parenthesized regex patterns.
  • Adjusts regex formatting in src/label/matcher.rs to ensure correct anchoring of alternations.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/parser/parse.rs Updated test regex strings to wrap inner patterns with parentheses.
src/label/matcher.rs Modified regex formatting to wrap the original regex with parentheses.

@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (711d484) to head (dd6982d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #110   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files          14       14           
  Lines        6694     6702    +8     
=======================================
+ Hits         6628     6636    +8     
  Misses         66       66           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

waynexia added 2 commits May 16, 2025 19:12
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Copy link

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@waynexia waynexia enabled auto-merge (squash) May 16, 2025 11:27
@waynexia waynexia merged commit 0410e8b into main May 16, 2025
5 checks passed
@waynexia waynexia deleted the regex-parentheses branch May 16, 2025 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants