summaryrefslogtreecommitdiff
path: root/cli/tools/fmt.rs
diff options
context:
space:
mode:
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(())