From f564497630d8d12023cd093904bf237ab1079a94 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 18 Jun 2022 12:44:43 -0400 Subject: fix(fmt): should fail `--check` on parse error (#14907) --- cli/tools/fmt.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/tools') diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index 3eb620900..4e399bcf5 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -316,6 +316,7 @@ async fn check_source_files( incremental_cache.update_file(&file_path, &file_text); } Err(e) => { + not_formatted_files_count.fetch_add(1, Ordering::Relaxed); let _g = output_lock.lock(); eprintln!("Error checking: {}", file_path.to_string_lossy()); eprintln!(" {}", e); -- cgit v1.2.3