Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions src/discover/discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ───────────────────────────────── */

Expand Down
7 changes: 7 additions & 0 deletions tests/test_discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ────────────────────────────────────────────── */

Expand Down Expand Up @@ -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);
Expand Down
Loading