aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-01-28 13:51:19 +0000
committerAkshay <[email protected]>2022-01-28 13:51:19 +0000
commit0b535b11bb03e4984cc2789a3e85f93989725e9a (patch)
tree299f96893045b2e9e633b92eda10e50dc11c3464 /bin
parent3d18754b9d744e63a93d61ba2fe931cb105ac5c4 (diff)
apply style suggestionfeat/exit-code
Diffstat (limited to 'bin')
-rw-r--r--bin/src/lint.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/src/lint.rs b/bin/src/lint.rs
index 4a8c540..a345558 100644
--- a/bin/src/lint.rs
+++ b/bin/src/lint.rs
@@ -61,13 +61,10 @@ pub mod main {
61 let lint = |vfs_entry| lint_with(vfs_entry, &lints, &session); 61 let lint = |vfs_entry| lint_with(vfs_entry, &lints, &session);
62 let results = vfs.iter().map(lint).collect::<Vec<_>>(); 62 let results = vfs.iter().map(lint).collect::<Vec<_>>();
63 63
64 if results.len() != 0 { 64 for r in &results {
65 for r in &results { 65 stdout.write(&r, &vfs, check_config.format).unwrap();
66 stdout.write(&r, &vfs, check_config.format).unwrap();
67 }
68 std::process::exit(1);
69 } 66 }
70 67
71 std::process::exit(0); 68 std::process::exit(if results.is_empty() { 0 } else { 1 });
72 } 69 }
73} 70}