Skip to content

Commit 9121077

Browse files
committed
chore: Added new HASH redaction for hashes in paths
1 parent ed8b696 commit 9121077

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/cargo-test-support/src/compare.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ fn add_regex_redactions(subs: &mut snapbox::Redactions) {
235235
// Match file name hashes like `foo-06b451d0d6f88b1d`
236236
subs.insert("[HASH]", regex!(r"[a-z0-9]+-(?<redacted>[a-f0-9]{16})"))
237237
.unwrap();
238+
// Match path hashes like `../06b451d0d6f88b1d/..` used in directory paths
239+
subs.insert("[HASH]", regex!(r"\/(?<redacted>[0-9a-f]{16})\/"))
240+
.unwrap();
238241
subs.insert(
239242
"[AVG_ELAPSED]",
240243
regex!(r"(?<redacted>[0-9]+(\.[0-9]+)?) ns/iter"),

0 commit comments

Comments
 (0)