diff options
Diffstat (limited to 'bin/src/main.rs')
-rw-r--r-- | bin/src/main.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/bin/src/main.rs b/bin/src/main.rs index c5d0626..90b79ce 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs | |||
@@ -20,17 +20,9 @@ fn _main() -> Result<(), StatixErr> { | |||
20 | match opts.cmd { | 20 | match opts.cmd { |
21 | SubCommand::Check(check_config) => { | 21 | SubCommand::Check(check_config) => { |
22 | let vfs = check_config.vfs()?; | 22 | let vfs = check_config.vfs()?; |
23 | let (lints, errors): (Vec<_>, Vec<_>) = | 23 | let mut stderr = io::stderr(); |
24 | vfs.iter().map(lint::lint).partition(Result::is_ok); | 24 | vfs.iter().map(lint::lint).for_each(|r| { |
25 | let lint_results = lints.into_iter().map(Result::unwrap); | 25 | stderr.write(&r, &vfs, check_config.format).unwrap(); |
26 | let errors = errors.into_iter().map(Result::unwrap_err); | ||
27 | |||
28 | let mut stdout = io::stdout(); | ||
29 | lint_results.for_each(|r| { | ||
30 | stdout.write(&r, &vfs, check_config.format).unwrap(); | ||
31 | }); | ||
32 | errors.for_each(|e| { | ||
33 | eprintln!("{}", e); | ||
34 | }); | 26 | }); |
35 | } | 27 | } |
36 | SubCommand::Fix(fix_config) => { | 28 | SubCommand::Fix(fix_config) => { |