pub fn function_names_match(query: &str, lcov: &str) -> (bool, MatchConfidence)Expand description
Pure function: Check if function names match with confidence level
Returns tuple of (matches: bool, confidence: MatchConfidence).
§Matching Strategy
- Exact match → High confidence
- Closure parent attribution → High confidence
- Variant match (method name, no generics) → Medium confidence
- Fuzzy substring match → Low confidence
- No match → None confidence
§Examples
use debtmap::risk::function_name_matching::{function_names_match, MatchConfidence};
let (matches, confidence) = function_names_match("foo", "foo");
assert!(matches);
assert_eq!(confidence, MatchConfidence::High);
let (matches, confidence) = function_names_match("Type::method", "method");
assert!(matches);
assert_eq!(confidence, MatchConfidence::Medium);