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
2 changes: 1 addition & 1 deletion src/discover/discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static const char *ALWAYS_SKIP_DIRS[] = {
".cargo", ".stack-work", ".dart_tool", "zig-cache", "zig-out", ".metals", ".bloop", ".bsp",
".ccls-cache", ".clangd", "elm-stuff", "_opam", ".cpcache", ".shadow-cljs",
/* Deploy */
".vercel", ".netlify",
".vercel", ".netlify", "deploy", "deployed",
/* Misc */
".qdrant_code_embeddings", ".tmp", "vendor", "vendored", NULL};

Expand Down
22 changes: 22 additions & 0 deletions tests/test_discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,27 @@ TEST(discover_generic_dirs_fast_mode) {
PASS();
}

TEST(discover_deploy_excluded_full_mode) {
char *base = th_mktempdir("cbm_disc_deploy");
ASSERT(base != NULL);

th_write_file(TH_PATH(base, "src/main.go"), "package main\n");
th_write_file(TH_PATH(base, "deploy/main.go"), "package deploy\n");
th_write_file(TH_PATH(base, "deployed/main.go"), "package deployed\n");

cbm_discover_opts_t opts = {.mode = CBM_MODE_FULL};
cbm_file_info_t *files = NULL;
int count = 0;

int rc = cbm_discover(base, &opts, &files, &count);
ASSERT_EQ(rc, 0);
ASSERT_EQ(count, 1);

cbm_discover_free(files, count);
th_cleanup(base);
PASS();
}

TEST(discover_cbmignore_no_git) {
char *base = th_mktempdir("cbm_disc_nogit");
ASSERT(base != NULL);
Expand Down Expand Up @@ -792,6 +813,7 @@ SUITE(discover) {
RUN_TEST(discover_new_ignore_patterns);
RUN_TEST(discover_generic_dirs_full_mode);
RUN_TEST(discover_generic_dirs_fast_mode);
RUN_TEST(discover_deploy_excluded_full_mode);
RUN_TEST(discover_cbmignore_no_git);

/* Nested .gitignore tests (issue #178) */
Expand Down
Loading