fix: statix always exits with exit code 1

This commit is contained in:
Akshay 2022-02-08 21:00:31 +05:30
parent ade09b4d17
commit 014be14e7d

View File

@ -61,7 +61,7 @@ pub mod main {
let lint = |vfs_entry| lint_with(vfs_entry, &lints, &session);
let results = vfs.iter().map(lint).collect::<Vec<_>>();
if results.len() != 0 {
if results.iter().map(|r| r.reports.len()).sum::<usize>() != 0 {
for r in &results {
stdout.write(&r, &vfs, check_config.format).unwrap();
}