Skip to content

feat(searchset): ignore line comments in regexset files#3622

Merged
jqnatividad merged 3 commits intomasterfrom
searchset-ignore-comments
Mar 17, 2026
Merged

feat(searchset): ignore line comments in regexset files#3622
jqnatividad merged 3 commits intomasterfrom
searchset-ignore-comments

Conversation

@jqnatividad
Copy link
Collaborator

No description provided.

jqnatividad and others added 3 commits March 17, 2026 07:37
Lines starting with # in the regexset file are now treated as comments
and skipped, making regex files easier to document and maintain.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Trim leading whitespace before checking for '#' comment prefix so that
  indented comments (e.g. "  # comment") are also skipped
- Document the comment syntax in the command's usage text
- Add searchset_comment_lines test verifying comment lines are ignored

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Contributor

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

Adds support for # line comments in searchset regexset files so users can annotate regex lists (and keep example files readable) without affecting matching.

Changes:

  • Update searchset regexset reader to ignore lines whose first non-whitespace character is #.
  • Add an integration test covering full-line and indented comment lines in regexset files.
  • Update searchset help text (Rust USAGE and rendered docs) to document the new comment behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/cmd/searchset.rs Filters out comment lines when loading regexset patterns; updates CLI help text accordingly.
tests/test_searchset.rs Adds coverage for comment and indented-comment lines in regexset files.
docs/help/searchset.md Documents comment-line support in regexset files.

@jqnatividad jqnatividad merged commit a994769 into master Mar 17, 2026
20 of 21 checks passed
@jqnatividad jqnatividad deleted the searchset-ignore-comments branch March 17, 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.

2 participants