helix/dna/cmd/fmt.rs
1use clap::Args;
2use std::path::PathBuf;
3use crate::mds::fmt;
4
5#[derive(Args)]
6pub struct FmtArgs {
7 /// Files to format (if empty, formats the whole project)
8 #[arg(short, long)]
9 files: Vec<PathBuf>,
10
11 /// Check if files are formatted (does not write changes)
12 #[arg(long)]
13 check: bool,
14
15 /// Show verbose output
16 #[arg(long)]
17 verbose: bool,
18}
19
20pub fn run(args: FmtArgs) -> anyhow::Result<()> {
21 fmt::format_files(args.files, args.check, args.verbose)
22}