MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / has_usage

Function has_usage

tests/test_extraction.c:2786–2793  ·  view source on GitHub ↗

Helper: does the file's usage list carry `name`? */

Source from the content-addressed store, hash-verified

2784
2785/* Helper: does the file's usage list carry `name`? */
2786static int has_usage(CBMFileResult *r, const char *name) {
2787 for (int i = 0; i < r->usages.count; i++) {
2788 if (r->usages.items[i].ref_name && strcmp(r->usages.items[i].ref_name, name) == 0) {
2789 return 1;
2790 }
2791 }
2792 return 0;
2793}
2794
2795TEST(dbt_model_and_ref_lineage) {
2796 /* A dbt model: the file stem is the model identity, and each ref() is a

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected