//! Arguments for `mcptest lint`.

use std::path::PathBuf;

use clap::{Args, ValueEnum};

/// Scan YAML suites and cassettes for usage of features deprecated by the
/// MCP 2026-07-28 spec. Reports per-finding severity, location, the
/// replacement, and a doc link.
///
/// One-shot, offline: no server is contacted. Walks every `*.yaml` /
/// `*.yml` / `*.json` file under each `paths` entry and matches against
/// the deprecation catalog.
#[derive(Debug, Args, Default)]
pub struct LintArgs {
    /// Paths to scan. Files are scanned directly; directories are walked
    /// recursively for `*.yaml`, `*.yml`, and `*.json` files. Defaults to
    /// the current directory.
    #[arg(value_name = "PATH")]
    pub paths: Vec<PathBuf>,

    /// Output format.
    #[arg(long, value_enum, value_name = "FORMAT", default_value_t = LintFormat::Pretty)]
    pub format: LintFormat,

    /// Treat findings as non-failure. The command always exits 0 when set
    /// (default behavior is to exit 1 if any finding lands).
    #[arg(long)]
    pub no_fail: bool,
}

/// Output format for `mcptest lint`.
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, ValueEnum)]
pub enum LintFormat {
    /// Human-readable table grouped by file.
    #[default]
    Pretty,
    /// Newline-delimited JSON per finding, plus a final `summary` line.
    Json,
}
