commit_wizard/cli/cmd/check/
mod.rs1use clap::Args as ClapArgs;
2
3use crate::{
4 cli::CliResult,
5 core::{commit, context::Context},
6};
7
8#[derive(Debug, Clone, ClapArgs)]
9#[command(about = "Validate commit history against the active Commit Wizard rules")]
10pub struct Args {
11 #[arg(long, alias = "count", value_name = "N")]
13 pub tail: Option<u32>,
14
15 #[arg(long)]
17 pub from: Option<String>,
18
19 #[arg(long)]
21 pub to: Option<String>,
22
23 #[arg(long, alias = "full-hash", short = 'H')]
25 pub full_commit_hash: bool,
26}
27
28pub async fn run(ctx: &Context, args: Args) -> CliResult<()> {
29 commit::check::run(ctx, args.tail, args.from, args.to, args.full_commit_hash)
30}