summaryrefslogtreecommitdiff
path: root/cli/deno_dir.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-04-19 22:14:00 -0400
committerGitHub <noreply@github.com>2022-04-19 22:14:00 -0400
commitae479b1036630970c0d0aaf67cbb500a3c7ed622 (patch)
tree14cd085a22b0ec34f24d3654b1525bf3dbd2f766 /cli/deno_dir.rs
parent803499886b90536cdbb9d40eaa9085157772d771 (diff)
perf(fmt/lint): incremental formatting and linting (#14314)
Diffstat (limited to 'cli/deno_dir.rs')
-rw-r--r--cli/deno_dir.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/deno_dir.rs b/cli/deno_dir.rs
index ca6f8b81f..ea46474d0 100644
--- a/cli/deno_dir.rs
+++ b/cli/deno_dir.rs
@@ -44,6 +44,18 @@ impl DenoDir {
Ok(deno_dir)
}
+
+ /// Path for the incremental cache used for formatting.
+ pub fn fmt_incremental_cache_db_file_path(&self) -> PathBuf {
+ // bump this version name to invalidate the entire cache
+ self.root.join("fmt_incremental_cache_v1")
+ }
+
+ /// Path for the incremental cache used for linting.
+ pub fn lint_incremental_cache_db_file_path(&self) -> PathBuf {
+ // bump this version name to invalidate the entire cache
+ self.root.join("lint_incremental_cache_v1")
+ }
}
/// To avoid the poorly managed dirs crate