Issue #15: Show list of available checks

This commit is contained in:
2023-11-06 13:59:08 +01:00
parent e2d5eedd02
commit 6da1c48c28
3 changed files with 64 additions and 6 deletions

View File

@@ -32,6 +32,7 @@ use std::path::{Path, PathBuf};
use std::str::FromStr;
use crate::checks::osc::check;
use crate::checks::print_checks;
use clap::Parser;
use console::style;
use dialoguer::Confirm;
@@ -259,10 +260,14 @@ fn main() -> Result<(), Box<dyn Error>> {
}
};
}
SubCommand::Check { file } => {
check(Path::new(file.as_str()))
.iter()
.for_each(|check_notice| println!("{}", check_notice));
SubCommand::Check { file, list } => {
if list {
print_checks();
} else {
check(Path::new(file.as_str()))
.iter()
.for_each(|check_notice| println!("{}", check_notice));
}
}
#[cfg(feature = "unzip-osb")]
SubCommand::UnzipOsb {