Skip to content

Tags with special characters - #123

Merged
ThoSe1990 merged 2 commits into
mainfrom
fix/tags-with-any-char
Jun 26, 2026
Merged

Tags with special characters#123
ThoSe1990 merged 2 commits into
mainfrom
fix/tags-with-any-char

Conversation

@ThoSe1990

@ThoSe1990 ThoSe1990 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

First fix to allow special characters in tags. For now the whitelist approach is a good enough solution.
Reported here: #119
But this still faces the issue that there is no escape logic. Issue #122 created. This will be done in the future

Summary by CodeRabbit

  • New Features
    • Scenario tags can now include dotted names and special characters when selecting scenarios.
    • Tag-based filtering now recognizes a broader set of tag formats, making scenario selection more flexible.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ThoSe1990, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 56 minutes and 8 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e82e7017-8e06-4b92-8773-dbf81c0ee689

📥 Commits

Reviewing files that changed from the base of the PR and between 2ab5015 and 18fe8c8.

📒 Files selected for processing (1)
  • CHANGELOG.md
📝 Walkthrough

Walkthrough

The PR broadens tag tokenization to accept additional punctuation, and adds parser, evaluator, and scenario-selection tests for dotted and special-character tags.

Changes

Tag tokenization and matching

Layer / File(s) Summary
Tag tokenization
src/scanner.cpp
scanner::tag() now consumes characters through is_tag_char(char), extending the accepted tag character set.
Tag parser and evaluator tests
gtest/tags.cc
Adds tag_expression and tag_evaluation coverage for dotted tags and tags containing special characters.
Scenario tag filtering
gtest/run_scenarios_tags.cc
Adds a scenario enumeration test that selects dotted and special-character tags and checks both matching scenarios run.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • Issue 122 — The scanner and test updates broaden tag handling to accept dotted and special-character tags, matching the issue’s scope.

Possibly related PRs

  • ThoSe1990/cwt-cucumber#111 — Also updates scanner::tag() and related tests to broaden which characters form a single tag token.

Poem

I’m a rabbit with a twitchy nose 🐰
I hopped where the taggy scanner goes.
Dots and symbols now nibble just right,
and the tests all boing with delight.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description mentions the goal and related issues, but it omits the required template sections and testing details. Fill in Summary, Motivation, Changes, How to Test, and Checklist sections, including the files changed and the exact verification commands.
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.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: expanding tag handling to support special characters.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tags-with-any-char

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
gtest/run_scenarios_tags.cc (1)

486-509: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Consider adding a boundary/negative case for special-char tag filtering.

This test only exercises the positive OR path. A complementary case—e.g. a grouped expression like (@my.tag.with.dotsand not@other) or a filter that should exclude one of the scenarios—would protect against future regressions where the broadened tag whitelist accidentally swallows a grouping/operator boundary.

Note: the performance_and_scalability category is not a perfect fit; the concern is test coverage of boundary behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gtest/run_scenarios_tags.cc` around lines 486 - 509, Add a negative/boundary
test around special-character tag filtering in
run_scenarios_special_tags::tag_with_special_chars to cover grouped tag
expressions and exclusion behavior, not just the current positive OR case.
Extend the scenario setup or add a nearby test that uses a filter such as a
grouped expression with not/and so one scenario should be skipped, then assert
the expected passed/skipped counts and that
cuke::internal::get_runtime_options().ignore_scenario() stays correct. This will
validate the parser and make sure the special-char whitelist in tag matching
does not swallow grouping/operator boundaries.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@gtest/run_scenarios_tags.cc`:
- Around line 486-509: Add a negative/boundary test around special-character tag
filtering in run_scenarios_special_tags::tag_with_special_chars to cover grouped
tag expressions and exclusion behavior, not just the current positive OR case.
Extend the scenario setup or add a nearby test that uses a filter such as a
grouped expression with not/and so one scenario should be skipped, then assert
the expected passed/skipped counts and that
cuke::internal::get_runtime_options().ignore_scenario() stays correct. This will
validate the parser and make sure the special-char whitelist in tag matching
does not swallow grouping/operator boundaries.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b973129-724e-4178-b171-a030bfcbc098

📥 Commits

Reviewing files that changed from the base of the PR and between f0de58f and 2ab5015.

📒 Files selected for processing (3)
  • gtest/run_scenarios_tags.cc
  • gtest/tags.cc
  • src/scanner.cpp

@ThoSe1990
ThoSe1990 merged commit c7e247a into main Jun 26, 2026
6 checks passed
@ThoSe1990
ThoSe1990 deleted the fix/tags-with-any-char branch July 13, 2026 06:12
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