use clap::Args;
use std::path::PathBuf;
#[derive(Args, Debug, Clone)]
pub struct LoggingArgs {
#[arg(long, help_heading = "Logging")]
pub log_file: Option<PathBuf>,
#[arg(long, default_value = "info", help_heading = "Logging")]
pub log_level: String,
}
#[derive(Args, Debug, Clone)]
pub struct CommonAnalyzeArgs {
#[command(flatten)]
pub logging: LoggingArgs,
#[arg(long)]
pub repo: PathBuf,
#[arg(long)]
pub from: String,
#[arg(long)]
pub to: String,
#[arg(short, long)]
pub output: Option<PathBuf>,
#[arg(long, help_heading = "Pipeline")]
pub behavioral: bool,
#[arg(long, hide = true)]
pub pipeline_v2: bool,
#[arg(long, help_heading = "LLM Options")]
pub no_llm: bool,
#[arg(long, help_heading = "LLM Options")]
pub llm_command: Option<String>,
#[arg(long, requires = "behavioral", help_heading = "LLM Options")]
pub llm_all_files: bool,
#[arg(long, default_value = "120", help_heading = "LLM Options")]
pub llm_timeout: u64,
}
#[derive(Args, Debug, Clone)]
pub struct CommonExtractArgs {
#[command(flatten)]
pub logging: LoggingArgs,
#[arg(long)]
pub repo: PathBuf,
#[arg(long, name = "ref")]
pub git_ref: String,
#[arg(short, long)]
pub output: Option<PathBuf>,
}
#[derive(Args, Debug, Clone)]
pub struct DiffArgs {
#[command(flatten)]
pub logging: LoggingArgs,
#[arg(long)]
pub from: PathBuf,
#[arg(long)]
pub to: PathBuf,
#[arg(short, long)]
pub output: Option<PathBuf>,
}
#[derive(Args, Debug, Clone)]
pub struct CommonKonveyorArgs {
#[command(flatten)]
pub logging: LoggingArgs,
#[arg(long, conflicts_with_all = ["repo", "from", "to"])]
pub from_report: Option<PathBuf>,
#[arg(long, required_unless_present = "from_report")]
pub repo: Option<PathBuf>,
#[arg(long, required_unless_present = "from_report")]
pub from: Option<String>,
#[arg(long, required_unless_present = "from_report")]
pub to: Option<String>,
#[arg(long)]
pub output_dir: PathBuf,
#[arg(long, help_heading = "Pipeline")]
pub behavioral: bool,
#[arg(long, hide = true)]
pub pipeline_v2: bool,
#[arg(long, help_heading = "LLM Options")]
pub no_llm: bool,
#[arg(long, help_heading = "LLM Options")]
pub llm_command: Option<String>,
#[arg(long, requires = "behavioral", help_heading = "LLM Options")]
pub llm_all_files: bool,
#[arg(long, default_value = "120", help_heading = "LLM Options")]
pub llm_timeout: u64,
#[arg(long, help_heading = "Rule Generation")]
pub no_consolidate: bool,
#[arg(long, help_heading = "Rule Generation")]
pub rename_patterns: Option<PathBuf>,
}