Skip to content

feat(rg): add stats output - #1657

Merged
chaliy merged 1 commit into
mainfrom
2026-05-22-rg-stats
May 22, 2026
Merged

chaliy merged 1 commit into
mainfrom
2026-05-22-rg-stats

Conversation

@chaliy

@chaliy chaliy commented May 22, 2026

Copy link
Copy Markdown
Contributor

What

Add rg --stats support with human-readable search statistics.

Why

Real ripgrep reports match, file, byte, and timing summary lines with --stats. Bashkit rg should expose the same common flag and keep parity for quiet/list modes.

How

  • Track rg search stats while scanning files
  • Append --stats summaries after normal output, excluding JSON summaries
  • Keep scanning all files when --stats is combined with -q/-l/--files-without-match
  • Add unit coverage, help coverage, and normalized real-rg differential cases
  • Update rg compatibility/status docs

Risk

  • Low
  • Stats timing is deterministic placeholder output; differential tests normalize elapsed timing while matching the substantive counts

Checklist

  • Tests added or updated
  • Backward compatibility considered

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 9d615a6 Commit Preview URL May 22 2026, 05:36 AM

@chaliy
chaliy merged commit 9989b29 into main May 22, 2026
34 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-stats branch May 22, 2026 05:48
chaliy added a commit that referenced this pull request May 30, 2026
## What
Add rg --stats support with human-readable search statistics.

## Why
Real ripgrep reports match, file, byte, and timing summary lines with
--stats. Bashkit rg should expose the same common flag and keep parity
for quiet/list modes.

## How
- Track rg search stats while scanning files
- Append --stats summaries after normal output, excluding JSON summaries
- Keep scanning all files when --stats is combined with
-q/-l/--files-without-match
- Add unit coverage, help coverage, and normalized real-rg differential
cases
- Update rg compatibility/status docs

## Risk
- Low
- Stats timing is deterministic placeholder output; differential tests
normalize elapsed timing while matching the substantive counts

## Checklist
- [x] Tests added or updated
- [x] Backward compatibility considered
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