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

Function cbm_sem_doc_folder_p

src/semantic/semantic.c:1963–1974  ·  view source on GitHub ↗

A doc's home folder as its candidate (SEM7): a README or index doc was * right 26 of 30 (0.87); any other doc 5 of 30 (not stored). Markdown only. */

Source from the content-addressed store, hash-verified

1961/* A doc's home folder as its candidate (SEM7): a README or index doc was
1962 * right 26 of 30 (0.87); any other doc 5 of 30 (not stored). Markdown only. */
1963float cbm_sem_doc_folder_p(cbm_sem_doc_format_t fmt, const char *doc_path) {
1964 if (fmt != CBM_SEM_DOC_FMT_MARKDOWN || !doc_path) {
1965 return 0.0F;
1966 }
1967 const char *base = strrchr(doc_path, '/');
1968 base = base ? base + 1 : doc_path;
1969 const char *dot = strrchr(base, '.');
1970 size_t n = dot ? (size_t)(dot - base) : strlen(base);
1971 bool readme = (n == sizeof("readme") - 1 && strncasecmp(base, "readme", n) == 0) ||
1972 (n == sizeof("index") - 1 && strncasecmp(base, "index", n) == 0);
1973 return readme ? 0.867F : 0.0F;
1974}
1975
1976cbm_sem_diag_family_t cbm_sem_diag_family(const char *format, const char *diagram_kind) {
1977 static const char *const mermaid[] = {"sequence", "class", "er",

Callers 2

doc_row_addFunction · 0.85
test_semantic.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected