helix/dna/cmd/lint.rs
1use clap::Args;
2use std::path::PathBuf;
3use crate::mds::lint;
4
5/// Arguments for the `lint` command.
6#[derive(Args, Debug)]
7pub struct LintArgs {
8 /// Files to lint (if empty, lints the whole project)
9 #[arg(value_name = "FILES")]
10 pub files: Vec<PathBuf>,
11
12 /// Enable verbose output
13 #[arg(short, long)]
14 pub verbose: bool,
15}
16
17pub async fn run(args: LintArgs) -> anyhow::Result<()> {
18 // Directly call the lint_files function from mds::lint
19 lint::lint_files(args.files, args.verbose)
20}