Skip to content

Commit

Permalink
feat(bin): move scripts to ripgrep for speed
Browse files Browse the repository at this point in the history
Move the scripts using non-standard arguments to ripgrep for faster
parsing and better compatibility. We already have this as a dependency
for other scripts and the '-P' argument we need for the advanced Perl
matching is only supported on gnu grep anyway.

Signed-off-by: Randolph Sapp <[email protected]>
  • Loading branch information
StaticRocket committed Dec 16, 2024
1 parent be5ca4f commit 02cd841
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/check-bad-include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# find files that incorrectly include top level files

grep -RiP '.. include:: .*/[^_\/]+[^\/]*\.rst' source/
rg -i '.. include:: .*/[^_\/]+[^\/]*\.rst' source/
2 changes: 1 addition & 1 deletion bin/check-bad-toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

find configs/ -name '*_toc.txt' -print0 |
while IFS= read -r -d '' file_name; do
grep -Pi '.*/_[^\/]*' "$file_name"
rg -i '.*/_[^\/]*' "$file_name"
done

0 comments on commit 02cd841

Please sign in to comment.