mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-06 17:49:47 +00:00
fix(discover): retain external source directories in fast mode
`external` was listed in FAST_SKIP_DIRS, so fast and moderate discovery silently dropped every directory named `external`. In many codebases that name holds first-party code (external-facing APIs, adapters, integration layers) rather than vendored third-party sources, and the dedicated `vendor` / `third_party` / `3rdparty` entries already cover the vendored case. Remove `external` from the fast skip list so those sources are indexed in every mode. The shortened list is regrouped with category comments in the same style as ALWAYS_SKIP_DIRS; element order is unchanged. Signed-off-by: Hubert Tarnacki <hubert.tarnacki@gmail.com>
This commit is contained in:
1 parent
339b3f4097
commit
80f8bda567
2 files changed
+24
-7
No files matched your search
+17
-7
@@ -52,13 +52,23 @@ static const char *ALWAYS_SKIP_DIRS[] = {
|
||||
".codebase-memory", ".qdrant_code_embeddings", ".tmp", "vendor", "vendored", NULL};
|
||||
|
||||
static const char *FAST_SKIP_DIRS[] = {
|
||||
"generated", "gen", "auto-generated", "fixtures", "testdata", "test_data",
|
||||
"__tests__", "__mocks__", "__snapshots__", "__fixtures__", "__test__", "docs",
|
||||
"doc", "documentation", "examples", "example", "samples", "sample",
|
||||
"assets", "static", "public", "media", "third_party", "thirdparty",
|
||||
"3rdparty", "external", "migrations", "seeds", "e2e", "integration",
|
||||
"locale", "locales", "i18n", "l10n", "scripts", "tools",
|
||||
"hack", "bin", "build", "out", NULL};
|
||||
/* Generated */
|
||||
"generated", "gen", "auto-generated",
|
||||
/* Tests */
|
||||
"fixtures", "testdata", "test_data", "__tests__", "__mocks__", "__snapshots__", "__fixtures__",
|
||||
"__test__",
|
||||
/* Docs and samples */
|
||||
"docs", "doc", "documentation", "examples", "example", "samples", "sample",
|
||||
/* Assets */
|
||||
"assets", "static", "public", "media",
|
||||
/* Third-party */
|
||||
"third_party", "thirdparty", "3rdparty",
|
||||
/* Data and integration tests */
|
||||
"migrations", "seeds", "e2e", "integration",
|
||||
/* Localization */
|
||||
"locale", "locales", "i18n", "l10n",
|
||||
/* Tooling and build output */
|
||||
"scripts", "tools", "hack", "bin", "build", "out", NULL};
|
||||
|
||||
/* ── Ignored suffixes ───────────────────────────────── */
|
||||
|
||||
|
||||
@@ -153,6 +153,12 @@ TEST(skip_fast_e2e) {
|
||||
ASSERT_TRUE(cbm_should_skip_dir("e2e", CBM_MODE_FAST));
|
||||
PASS();
|
||||
}
|
||||
TEST(no_skip_fast_external) {
|
||||
ASSERT_FALSE(cbm_should_skip_dir("external", CBM_MODE_FAST));
|
||||
ASSERT_FALSE(cbm_should_skip_dir("external", CBM_MODE_MODERATE));
|
||||
ASSERT_FALSE(cbm_should_skip_dir("shop-external-api", CBM_MODE_FAST));
|
||||
PASS();
|
||||
}
|
||||
|
||||
/* ── Suffix filters ────────────────────────────────────────────── */
|
||||
|
||||
@@ -1867,6 +1873,7 @@ SUITE(discover) {
|
||||
RUN_TEST(skip_fast_assets);
|
||||
RUN_TEST(skip_fast_3rdparty);
|
||||
RUN_TEST(skip_fast_e2e);
|
||||
RUN_TEST(no_skip_fast_external);
|
||||
|
||||
/* Suffix filters */
|
||||
RUN_TEST(suffix_pyc);
|
||||
|
||||
Reference in new issue
Block a user