Skip to content

Commit

Permalink
Start summary command
Browse files Browse the repository at this point in the history
  • Loading branch information
adpaco-aws committed Aug 29, 2024
1 parent ad632f3 commit a659c1a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 10 additions & 2 deletions tools/kani-cov/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{merge, summary, report};
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
Merge(MergeArgs),
// Summary(SummaryArgs),
Summary(SummaryArgs),
// Report(ReportArgs),
}

Expand All @@ -38,14 +38,22 @@ pub struct MergeArgs {
pub files: Vec<PathBuf>,
}

#[derive(Debug, clap::Args)]
pub struct SummaryArgs {
#[arg(required = true)]
pub profile: Vec<PathBuf>,
#[arg(required = true)]
pub output: Option<PathBuf>,
}

pub fn validate_args(args: &Args) -> Result<()> {
if args.command.is_none() {
bail!("subcommand needs to be specified")
}

match args.command.as_ref().unwrap() {
Subcommand::Merge(merge_args) => merge::validate_merge_args(&merge_args)?,
// Subcommand::Summary => summary::validate_summary_args(args)?,
Subcommand::Summary(summary_args) => summary::validate_summary_args(&summary_args)?,
// Subcommand::Report => report::validate_report_args(args)?,
};

Expand Down
8 changes: 7 additions & 1 deletion tools/kani-cov/src/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

use anyhow::Result;

pub fn summary_main() -> Result<()> {
use crate::args::SummaryArgs;

pub fn summary_main(_args: &SummaryArgs) -> Result<()> {
Ok(())
}

pub fn validate_summary_args(_args: &SummaryArgs) -> Result<()> {
Ok(())
}

0 comments on commit a659c1a

Please sign in to comment.