Skip to content

Fixing parenthesis in steps / adding escape character - #129

Merged
ThoSe1990 merged 5 commits into
mainfrom
fix/values-in-parenthesis
Jul 24, 2026
Merged

Fixing parenthesis in steps / adding escape character#129
ThoSe1990 merged 5 commits into
mainfrom
fix/values-in-parenthesis

Conversation

@ThoSe1990

@ThoSe1990 ThoSe1990 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Added escape character for parenthesis and curly braces.

Reported here: #128

Summary by CodeRabbit

  • New Features

    • Added support for step definitions that capture and validate coordinate values, item counts, and status text.
    • Added an example step for displaying coordinate values.
  • Bug Fixes

    • Improved handling of literal parentheses and curly braces in step patterns.
    • Preserved correct parsing of typed values alongside escaped characters.
    • Enhanced support for optional singular and plural wording.
  • Tests

    • Added broader coverage for escaped characters, alternation, boundaries, and coordinate scenarios.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change updates regex construction to preserve escaped parentheses and curly braces, adds focused unit coverage for delimiter escaping and typed captures, and extends stress/example steps for coordinates, optional item wording, and literal status text.

Changes

Regex escaping

Layer / File(s) Summary
Regex utility handling
src/util_regex.hpp
Regex construction now preserves escaped bracket characters while continuing to generate optional groups and word alternations.
Regex matching coverage
gtest/step_finder.cc
Tests cover escaped parentheses and braces, mixed {int} placeholders, alternation, boundaries, and unrelated backslashes.
Stress-test integration
stress-tests/CMakeLists.txt, stress-tests/step_definition.cpp, stress-tests/features/stress-tests.feature, examples/step_definition.cpp
Stress and example steps cover coordinate parsing, singular/plural item text, and literal {status} capture; the stress executable also includes hooks.cpp.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description omits the required template sections for Summary, Motivation, Changes, How to Test, and Checklist. Expand it to match the template: add summary, issue link in motivation, specific changed files, test commands, and checklist items.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main change: adding escape handling for parentheses and braces in step patterns.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/values-in-parenthesis

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ThoSe1990
ThoSe1990 marked this pull request as ready for review July 24, 2026 13:04
@ThoSe1990
ThoSe1990 merged commit 2451e6a into main Jul 24, 2026
6 checks passed
@ThoSe1990
ThoSe1990 deleted the fix/values-in-parenthesis branch August 26, 2026 11:52
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.

1 participant