Expand description
Pattern detection utilities for bug-hunter.
This module contains functions for detecting code patterns and determining whether they represent real technical debt or false positives.
§Safety:
This module contains the string literals “unsafe {” and “transmute” as pattern matchers for detecting unsafe code in scanned files. These are string constants used for pattern matching, not actual unsafe code.
Functions§
- compute_
test_ lines - Determine which lines are inside test code (after #[cfg(test)] or #test).
- is_
real_ pattern - Check if pattern appears in a “real” code context, not inside a string literal.
- should_
suppress_ finding - Check if a finding should be suppressed (BH-15). Wired into analyze_common_patterns per issue #17.