Skip to content

Commit e58c48f

Browse files
committed
tooling: Improve grep-uuids to better show duplicates
1 parent 6c03bd5 commit e58c48f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,13 @@ todos:
153153

154154
.PHONY: grep-uuids
155155
grep-uuids:
156-
$(AG) "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b"
156+
@rg -H --no-heading '^.*([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}).*$$' -r '$$1' \
157+
| sed -nr 's/^(.+):([a-f0-9-]+)$$/\1\t\2/p' \
158+
| sort -k2 \
159+
| uniq --all-repeated=separate -f1 \
160+
| sed -r 's/^(.*) (.*)$$/\2\t\1/'
157161

162+
.PHONY: grep-conan-requires
158163
grep-conan-requires:
159164
@rg -t py '^.*requires\(f?["](.+/[0-9]+\.[^)]+)["].*\).*$$' -r '$$1' -I --no-heading --no-line-number | sort | uniq
160165

0 commit comments

Comments
 (0)