summaryrefslogtreecommitdiff
path: root/cli/tools/fmt.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-04 18:54:54 -0500
committerGitHub <noreply@github.com>2023-01-04 18:54:54 -0500
commit0ee64ad84726f7c91842c6a2dab0cb6a96dead4b (patch)
tree50d42e65d1f1d1e6b1cffc4e9f38f3e2a5d1dd59 /cli/tools/fmt.rs
parent319f6074761421b797db71bf10f6171516e3d92a (diff)
fix: upgrade deno_ast to 0.23 (#17269)
Closes #17172 Closes #15669 Closes #8529
Diffstat (limited to 'cli/tools/fmt.rs')
-rw-r--r--cli/tools/fmt.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs
index 3cfec9019..d146c958e 100644
--- a/cli/tools/fmt.rs
+++ b/cli/tools/fmt.rs
@@ -327,7 +327,20 @@ async fn check_source_files(
not_formatted_files_count.fetch_add(1, Ordering::Relaxed);
let _g = output_lock.lock();
warn!("Error checking: {}", file_path.to_string_lossy());
- warn!(" {}", e);
+ warn!(
+ "{}",
+ format!("{}", e)
+ .split('\n')
+ .map(|l| {
+ if l.trim().is_empty() {
+ String::new()
+ } else {
+ format!(" {}", l)
+ }
+ })
+ .collect::<Vec<_>>()
+ .join("\n")
+ );
}
}
Ok(())