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

Function cmp_scope_by_specificity

src/pipeline/path_alias.c:154–166  ·  view source on GitHub ↗

qsort comparator: scopes by dir_prefix length, descending. */

Source from the content-addressed store, hash-verified

152
153/* qsort comparator: scopes by dir_prefix length, descending. */
154static int cmp_scope_by_specificity(const void *a, const void *b) {
155 const cbm_path_alias_scope_t *sa = a;
156 const cbm_path_alias_scope_t *sb = b;
157 size_t la = strlen(sa->dir_prefix);
158 size_t lb = strlen(sb->dir_prefix);
159 if (lb > la) {
160 return 1;
161 }
162 if (lb < la) {
163 return -1;
164 }
165 return 0;
166}
167
168/* ── tsconfig.json / jsconfig.json loader ──────────────────────── */
169

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected