diff --git a/README.md b/README.md index 55e68c2..9db91a8 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ $ unicop example-files/homoglyph.js example-files/invisible.js example-files/not 6 │ ]; ╰──── Error while scanning example-files/not-utf-8-file.ts: Failed to read file (stream did not contain valid UTF-8) + Scanned 486 unicode code points in 2 files, resulting in 3 rule violations Failed to scan 1 file diff --git a/src/main.rs b/src/main.rs index 95bc76c..9e9a35f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -202,6 +202,11 @@ fn main() -> anyhow::Result<()> { } } + // If any errors have been reported, print an empty line. Visually separates + // the below stats summary from the above error printing + if global_scan_stats.num_rule_violations > 0 || num_failed_files > 0 { + println!(""); + } println!( "Scanned {} unicode code points in {} files, resulting in {} rule violations", global_scan_stats.num_unicode_code_points,