MCPcopy Create free account
hub / github.com/CodeBendKit/codeseek / find_call_chains

Method find_call_chains

rust-core/src/services/analyzer.rs:84–97  ·  view source on GitHub ↗

查找调用链

(&self, function_name: &str, max_depth: usize)

Source from the content-addressed store, hash-verified

82
83 /// 查找调用链
84 pub fn find_call_chains(&self, function_name: &str, max_depth: usize) -> Vec<Vec<&FunctionInfo>> {
85 if let Some(code_graph) = &self.code_graph {
86 if let Some(function) = code_graph.find_functions_by_name(function_name).first() {
87 let chains = code_graph.get_call_chain(&function.id, max_depth);
88 chains.into_iter().map(|chain| {
89 chain.iter().filter_map(|id| code_graph.functions.get(id)).collect()
90 }).collect()
91 } else {
92 Vec::new()
93 }
94 } else {
95 Vec::new()
96 }
97 }
98
99 /// 查找循环依赖
100 pub fn find_circular_dependencies(&self) -> Vec<Vec<&FunctionInfo>> {

Callers

nothing calls this directly

Calls 3

getMethod · 0.80
get_call_chainMethod · 0.45

Tested by

no test coverage detected