Skip to content

Conversation

edi9999
Copy link
Contributor

@edi9999 edi9999 commented Sep 15, 2025

Summary by CodeRabbit

  • Documentation
    • Added a second tip to the atomic-rule regex docs demonstrating Rust-style inline flags, with an example ((?i)apple) for case-insensitive matching.
    • Clarifies how to toggle flags within patterns and contrasts Rust-style vs PCRE-like syntax.
    • Aligns guidance with engine behavior; purely informational with no code or runtime changes.

Copy link

coderabbitai bot commented Sep 15, 2025

Walkthrough

Documentation update adding a second informational tip to the atomic rule guide demonstrating Rust-style inline regex flags (e.g., (?i)apple) for case-insensitive matching. No code or runtime changes.

Changes

Cohort / File(s) Summary
Docs: Regex Atomic Rule Tip
website/guide/rule-config/atomic-rule.md
Added a second tip showing Rust-style inline regex flags (e.g., (?i)apple) for case-insensitive matching; prose-only documentation change.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through docs so neat,
Adds a regex tip, concise and sweet.
“Use (?i)!” the carrots cheer,
Case folds vanish, matches clear.
With whiskers twitching, guides refined—
One hop ahead, by regex aligned. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Document tip of using regex flags, regex: (?i)apple" clearly reflects the primary change described in the diff: adding a documentation tip about using inline regex flags with an example. It is specific and directly related to the changeset, so a teammate scanning history will understand the main intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b616724 and 6dfdc56.

📒 Files selected for processing (1)
  • website/guide/rule-config/atomic-rule.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/guide/rule-config/atomic-rule.md

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
website/guide/rule-config/atomic-rule.md (1)

164-170: Fix linter warning, punctuation, and a typo; prefer a YAML example over a list item.

Switch the dash list to a code block (resolves MD004), remove the extra space before the colon, and fix “as way as” → “as well as.” This also aligns with doc formatting elsewhere in this page.

-:::tip
-You can use [Rust syntax for your regex flags](https://docs.rs/regex/latest/regex/#grouping-and-flags), such as :
-
-- `regex: "(?i)apple"` which will match Apple as way as apple or APPLE
-
-:::
+:::tip
+You can use [Rust‑style inline flags](https://docs.rs/regex/latest/regex/#grouping-and-flags), for example:
+
+```yaml
+rule:
+  regex: "(?i)apple"
+```
+
+This matches Apple as well as apple or APPLE.
+:::
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b61d599 and b616724.

📒 Files selected for processing (1)
  • website/guide/rule-config/atomic-rule.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
website/**/*.md

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

website/**/*.md: Documentation should use clear, concise language
Include code examples for concepts in documentation
Test documentation examples in the playground when possible
Maintain consistent formatting across documentation pages

Files:

  • website/guide/rule-config/atomic-rule.md
🪛 markdownlint-cli2 (0.17.2)
website/guide/rule-config/atomic-rule.md

167-167: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)

Copy link
Member

@HerringtonDarkholme HerringtonDarkholme left a comment

Choose a reason for hiding this comment

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

looks good

@HerringtonDarkholme HerringtonDarkholme added this pull request to the merge queue Sep 16, 2025
Merged via the queue into ast-grep:main with commit db4b485 Sep 16, 2025
1 check passed
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.

2 participants