MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / flush_fn_ref_candidates

Method flush_fn_ref_candidates

codegraph-kernel/src/go.rs:1033–1062  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1031 }
1032
1033 fn flush_fn_ref_candidates(&mut self) {
1034 let cands = std::mem::take(&mut self.fn_ref_cands);
1035 if cands.is_empty() || util::is_generated_file(self.file_path) {
1036 return;
1037 }
1038 let mut seen: HashSet<(String, String)> = HashSet::new();
1039 for c in cands {
1040 if !c.name.starts_with("this.")
1041 && !c.name.contains("::")
1042 && !self.defined_fn_names.contains(&c.name)
1043 && !self.imported_names.contains(&c.name)
1044 {
1045 continue;
1046 }
1047 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1048 continue;
1049 }
1050 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1051 let name_ref = self.arena.put(&c.name);
1052 self.tables.push_ref(&RefRow {
1053 from_idx: c.from,
1054 kind: FUNCTION_REF_CODE,
1055 line: c.line,
1056 column,
1057 reference_name: name_ref,
1058 candidates: NONE_STR,
1059 from_id_str: NONE_STR,
1060 });
1061 }
1062 }
1063
1064 // --- value refs -------------------------------------------------------------------
1065

Callers 1

extractFunction · 0.45

Calls 4

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.80
push_refMethod · 0.45

Tested by

no test coverage detected