Skip to content

Commit

Permalink
perf(lsp): don't walk coverage directory (#26715)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn authored and bartlomieju committed Nov 5, 2024
1 parent 01c4a2e commit 2be26f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cli/lsp/language_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,10 @@ impl Inner {
// We ignore these directories by default because there is a
// high likelihood they aren't relevant. Someone can opt-into
// them by specifying one of them as an enabled path.
if matches!(dir_name.as_str(), "vendor" | "node_modules" | ".git") {
if matches!(
dir_name.as_str(),
"vendor" | "coverage" | "node_modules" | ".git"
) {
continue;
}
// ignore cargo target directories for anyone using Deno with Rust
Expand Down Expand Up @@ -3944,7 +3947,9 @@ mod tests {
fn test_walk_workspace() {
let temp_dir = TempDir::new();
temp_dir.create_dir_all("root1/vendor/");
temp_dir.create_dir_all("root1/coverage/");
temp_dir.write("root1/vendor/mod.ts", ""); // no, vendor
temp_dir.write("root1/coverage/mod.ts", ""); // no, coverage

temp_dir.create_dir_all("root1/node_modules/");
temp_dir.write("root1/node_modules/mod.ts", ""); // no, node_modules
Expand Down

0 comments on commit 2be26f8

Please sign in to comment.