From 014be14e7dc64520b41aedb2d9c9aa719cdf0577 Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 8 Feb 2022 21:00:31 +0530 Subject: fix: statix always exits with exit code 1 --- bin/src/lint.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/src/lint.rs b/bin/src/lint.rs index 4a8c540..23a1d10 100644 --- a/bin/src/lint.rs +++ b/bin/src/lint.rs @@ -61,7 +61,7 @@ pub mod main { let lint = |vfs_entry| lint_with(vfs_entry, &lints, &session); let results = vfs.iter().map(lint).collect::>(); - if results.len() != 0 { + if results.iter().map(|r| r.reports.len()).sum::() != 0 { for r in &results { stdout.write(&r, &vfs, check_config.format).unwrap(); } -- cgit v1.2.3