use crate::comment::todo::TodoType;
use clap::{Parser, Subcommand, ValueEnum};
use std::path::PathBuf;
#[derive(Debug, Parser)]
#[command(
name = "towl",
author,
version,
about = "Todo Owl - watches over your project's source code for TODO comments",
long_about = "Todo Owl (tOwl) - Scans your codebase for TODO comments and outputs them in various formats"
)]
pub struct Cli {
#[command(subcommand)]
pub command: TowlCommands,
}
#[derive(Debug, Subcommand)]
pub enum TowlCommands {
Init {
#[arg(long, short = 'p', default_value = ".towl.toml")]
path: PathBuf,
#[arg(long, short = 'F')]
force: bool,
},
Scan {
#[arg(long, short = 'c')]
config: Option<PathBuf>,
#[arg(default_value = ".")]
path: PathBuf,
#[arg(long, short = 'N')]
non_interactive: bool,
#[arg(long, short = 'f', value_enum, default_value = "terminal")]
format: OutputFormat,
#[arg(long, short = 'o')]
output: Option<PathBuf>,
#[arg(long, short = 't', value_enum)]
todo_type: Option<TodoType>,
#[arg(long, short = 'v')]
verbose: bool,
#[arg(long, short = 'g')]
github: bool,
#[arg(long, short = 'n')]
dry_run: bool,
#[arg(long)]
ai: bool,
},
Config {
#[arg(long, short = 'c')]
config: Option<PathBuf>,
},
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
pub enum OutputFormat {
Table,
Json,
Csv,
Toml,
Markdown,
Terminal,
}