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

Method flush_fn_ref_candidates

codegraph-kernel/src/scala.rs:1354–1383  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1352 }
1353
1354 fn flush_fn_ref_candidates(&mut self) {
1355 let cands = std::mem::take(&mut self.fn_ref_cands);
1356 if cands.is_empty() || util::is_generated_file(self.file_path) {
1357 return;
1358 }
1359 let mut seen: HashSet<(String, String)> = HashSet::new();
1360 for c in cands {
1361 if !c.name.starts_with("this.")
1362 && !c.name.contains("::")
1363 && !self.defined_fn_names.contains(&c.name)
1364 && !self.imported_names.contains(&c.name)
1365 {
1366 continue;
1367 }
1368 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1369 continue;
1370 }
1371 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1372 let name_ref = self.arena.put(&c.name);
1373 self.tables.push_ref(&RefRow {
1374 from_idx: c.from,
1375 kind: FUNCTION_REF_CODE,
1376 line: c.line,
1377 column,
1378 reference_name: name_ref,
1379 candidates: NONE_STR,
1380 from_id_str: NONE_STR,
1381 });
1382 }
1383 }
1384
1385 // --- value-reference edges (:398-931) ---------------------------------
1386

Callers 1

extractFunction · 0.45

Calls 5

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.65
takeFunction · 0.50
push_refMethod · 0.45

Tested by

no test coverage detected