From ae479b1036630970c0d0aaf67cbb500a3c7ed622 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 19 Apr 2022 22:14:00 -0400 Subject: perf(fmt/lint): incremental formatting and linting (#14314) --- cli/deno_dir.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cli/deno_dir.rs') 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 -- cgit v1.2.3