pub fn is_likely_false_positive(
text: &str,
match_start: usize,
match_end: usize,
) -> boolExpand description
Check whether a PII match is likely a false positive based on its context.
Returns true (suppress the match) when:
- The match is inside a fenced code block (
```) - The match is on an indented code line (4+ spaces or tab)
- The match is inside a URL (
http:///https://) - The matched text is a well-known placeholder or example value
ยงArguments
textโ the full source text being scannedmatch_startโ byte offset where the match beginsmatch_endโ byte offset where the match ends