Merge pull request #2161 from htarnacki/fix/discover-external-fast-mode

fix(discover): retain external source directories in fast mode (#2151)
This commit is contained in:
Martin Vogel authored and GitHub committed 2026-10-28 07:47:51 +01:00
commit 820cd02307
3 files changed
+24 -8

No files matched your search

+17 -7
View File
@@ -75,13 +75,23 @@ static const char *ALWAYS_SKIP_DIR_SUFFIXES[] = {
"storage/framework/views", 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 ───────────────────────────────── */
@@ -288,7 +288,6 @@ TEST(invariant_discovery_fast_skip_dirs) {
{ "public" },
{ "third_party" },
{ "thirdparty" },
{ "external" },
{ "migrations" },
{ "build" }, /* build is in FAST_SKIP_DIRS, not ALWAYS */
{ "bin" },
+7
View File
@@ -154,6 +154,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 ────────────────────────────────────────────── */
@@ -2474,6 +2480,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);