summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2024-11-04 16:36:21 +0000
committerGitHub <noreply@github.com>2024-11-04 16:36:21 +0000
commitd95f06f20b97839d9a2aaeb590f4ed30b6383b0f (patch)
tree62b6935ae61d118e3edb72176df64f593b95a4c5
parent2c8a0e791732ab00907ca11c3a4918ad26ead03f (diff)
perf(lsp): don't walk coverage directory (#26715)
-rw-r--r--cli/lsp/language_server.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index 4fa0e3afb..61a02f036 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -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
@@ -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