mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-04-19 19:56:50 +00:00
Show issue counts ahead of issue list
This commit is contained in:
parent
a08abd7688
commit
f02ea9b065
15
src/main.rs
15
src/main.rs
@ -32,7 +32,7 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use crate::checks::osc::check;
|
use crate::checks::osc::check;
|
||||||
use crate::checks::print_checks;
|
use crate::checks::{print_checks, CheckNotice};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use console::style;
|
use console::style;
|
||||||
use dialoguer::Confirm;
|
use dialoguer::Confirm;
|
||||||
@ -269,7 +269,18 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
if list {
|
if list {
|
||||||
print_checks();
|
print_checks();
|
||||||
} else {
|
} else {
|
||||||
check(Path::new(file.as_str()))
|
let notices = check(Path::new(file.as_str()));
|
||||||
|
println!(
|
||||||
|
"Es wurden {} Probleme gefunden\n",
|
||||||
|
notices
|
||||||
|
.iter()
|
||||||
|
.filter(|notice| match notice {
|
||||||
|
CheckNotice::ErrorWithCode { .. } | CheckNotice::Error { .. } => true,
|
||||||
|
_ => false,
|
||||||
|
})
|
||||||
|
.count()
|
||||||
|
);
|
||||||
|
notices
|
||||||
.iter()
|
.iter()
|
||||||
.for_each(|check_notice| println!("{}", check_notice));
|
.for_each(|check_notice| println!("{}", check_notice));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user