use std::path::PathBuf;
#[derive(Debug, Clone, Default)]
pub struct AutoOptions {
pub roots: Vec<PathBuf>,
pub full_scan: bool,
pub scan_all: bool,
pub for_agent_feed: bool,
pub agent_json: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
}
#[derive(Debug, Clone, Default)]
pub struct ScanOptions {
pub roots: Vec<PathBuf>,
pub full_scan: bool,
pub scan_all: bool,
pub watch: bool,
}
#[derive(Debug, Clone, Default)]
pub struct TreeOptions {
pub roots: Vec<PathBuf>,
pub depth: Option<usize>,
pub summary: Option<usize>,
pub summary_only: bool,
pub loc_threshold: Option<usize>,
pub show_hidden: bool,
pub find_artifacts: bool,
pub show_ignored: bool,
}
#[derive(Debug, Clone, Default)]
pub struct SliceOptions {
pub target: String,
pub root: Option<PathBuf>,
pub consumers: bool,
pub depth: Option<usize>,
pub rescan: bool,
}
#[derive(Debug, Clone, Default)]
pub struct FindOptions {
pub query: Option<String>,
pub queries: Vec<String>,
pub or_mode: bool,
pub symbol: Option<String>,
pub file: Option<String>,
pub impact: Option<String>,
pub similar: Option<String>,
pub dead_only: bool,
pub exported_only: bool,
pub lang: Option<String>,
pub limit: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct FindingsOptions {
pub roots: Vec<PathBuf>,
pub summary: bool,
}
#[derive(Debug, Clone, Default)]
pub struct DeadOptions {
pub roots: Vec<PathBuf>,
pub confidence: Option<String>,
pub top: Option<usize>,
pub full: bool,
pub path_filter: Option<String>,
pub with_tests: bool,
pub with_helpers: bool,
pub with_shadows: bool,
pub with_ambient: bool,
pub with_dynamic: bool,
}
#[derive(Debug, Clone, Default)]
pub struct CyclesOptions {
pub roots: Vec<PathBuf>,
pub path_filter: Option<String>,
pub breaking_only: bool,
pub explain: bool,
pub legacy_format: bool,
}
#[derive(Debug, Clone, Default)]
pub struct TraceOptions {
pub handler: String,
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct CommandsOptions {
pub roots: Vec<PathBuf>,
pub name_filter: Option<String>,
pub missing_only: bool,
pub unused_only: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
pub limit: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct CoverageOptions {
pub roots: Vec<PathBuf>,
pub handlers_only: bool,
pub events_only: bool,
pub min_severity: Option<String>,
pub tests: bool,
pub gaps: bool,
}
#[derive(Debug, Clone, Default)]
pub struct RoutesOptions {
pub roots: Vec<PathBuf>,
pub framework: Option<String>,
pub path_filter: Option<String>,
}
#[derive(Debug, Clone, Default)]
pub struct EventsOptions {
pub roots: Vec<PathBuf>,
pub ghost: bool,
pub orphan: bool,
pub races: bool,
pub fe_sync: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
}
#[derive(Debug, Clone, Default)]
pub struct PipelinesOptions {
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct InsightsOptions {
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct ManifestsOptions {
pub roots: Vec<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct InfoOptions {
pub root: Option<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct LintOptions {
pub roots: Vec<PathBuf>,
pub entrypoints: bool,
pub fail: bool,
pub sarif: bool,
pub tauri: bool,
pub deep: bool,
pub ts: bool,
pub react: bool,
pub memory: bool,
pub suppress_duplicates: bool,
pub suppress_dynamic: bool,
}
#[derive(Debug, Clone, Default)]
pub struct ReportOptions {
pub roots: Vec<PathBuf>,
pub output: Option<PathBuf>,
pub serve: bool,
pub port: Option<u16>,
pub editor: Option<String>,
}
#[derive(Debug, Clone, Default)]
pub struct DiffOptions {
pub since: Option<String>,
pub to: Option<String>,
pub jsonl: bool,
pub problems_only: bool,
pub auto_scan_base: bool,
}
#[derive(Debug, Clone)]
pub struct MemexOptions {
pub report_path: PathBuf,
pub project_id: Option<String>,
pub namespace: String,
pub db_path: Option<String>,
}
impl Default for MemexOptions {
fn default() -> Self {
Self {
report_path: PathBuf::from(".loctree"),
project_id: None,
namespace: "loctree".to_string(),
db_path: None,
}
}
}
#[derive(Debug, Clone, Default)]
pub struct CrowdOptions {
pub pattern: Option<String>,
pub roots: Vec<PathBuf>,
pub auto_detect: bool,
pub min_size: Option<usize>,
pub limit: Option<usize>,
pub include_tests: bool,
}
#[derive(Debug, Clone, Default)]
pub struct TagmapOptions {
pub keyword: String,
pub roots: Vec<PathBuf>,
pub include_tests: bool,
pub limit: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct TwinsOptions {
pub path: Option<PathBuf>,
pub dead_only: bool,
pub include_suppressed: bool,
pub include_tests: bool,
pub ignore_conventions: bool,
}
#[derive(Debug, Clone, Default)]
pub struct SuppressOptions {
pub path: Option<PathBuf>,
pub suppression_type: Option<String>,
pub symbol: Option<String>,
pub file: Option<String>,
pub reason: Option<String>,
pub list: bool,
pub clear: bool,
pub remove: bool,
}
#[derive(Debug, Clone, Default)]
pub struct DistOptions {
pub source_maps: Vec<PathBuf>,
pub src: Option<PathBuf>,
pub report_path: Option<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct SniffOptions {
pub path: Option<PathBuf>,
pub dead_only: bool,
pub twins_only: bool,
pub crowds_only: bool,
pub include_tests: bool,
pub min_crowd_size: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct JqQueryOptions {
pub filter: String,
pub raw_output: bool,
pub compact_output: bool,
pub exit_status: bool,
pub string_args: Vec<(String, String)>,
pub json_args: Vec<(String, String)>,
pub snapshot_path: Option<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct ImpactCommandOptions {
pub target: String,
pub depth: Option<usize>,
pub root: Option<PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct FocusOptions {
pub target: String,
pub root: Option<PathBuf>,
pub consumers: bool,
pub depth: Option<usize>,
}
#[derive(Debug, Clone, Default)]
pub struct HotspotsOptions {
pub root: Option<PathBuf>,
pub min_imports: Option<usize>,
pub limit: Option<usize>,
pub leaves_only: bool,
pub coupling: bool,
}
#[derive(Debug, Clone, Default)]
pub struct LayoutmapOptions {
pub root: Option<PathBuf>,
pub zindex_only: bool,
pub sticky_only: bool,
pub grid_only: bool,
pub min_zindex: Option<i32>,
pub exclude: Vec<String>,
}
#[derive(Debug, Clone, Default)]
pub struct ZombieOptions {
pub roots: Vec<PathBuf>,
pub include_tests: bool,
}
#[derive(Debug, Clone, Default)]
pub struct HealthOptions {
pub roots: Vec<PathBuf>,
pub include_tests: bool,
}
#[derive(Debug, Clone, Default)]
pub struct AuditOptions {
pub roots: Vec<PathBuf>,
pub include_tests: bool,
pub todos: bool,
pub limit: Option<usize>,
pub no_open: bool,
}
#[derive(Debug, Clone, Default)]
pub struct DoctorOptions {
pub roots: Vec<PathBuf>,
pub include_tests: bool,
pub apply_suppressions: bool,
}
#[derive(Debug, Clone, Default)]
pub struct PlanOptions {
pub roots: Vec<PathBuf>,
pub target_layout: Option<String>,
pub markdown: bool,
pub json: bool,
pub script: bool,
pub all: bool,
pub min_coupling: Option<f64>,
pub max_module_size: Option<usize>,
pub include_tests: bool,
pub output: Option<PathBuf>,
pub no_open: bool,
}
#[derive(Debug, Clone, Default)]
pub struct HelpOptions {
pub command: Option<String>,
pub legacy: bool,
pub full: bool,
}
#[derive(Debug, Clone)]
pub enum CacheAction {
List,
Clean {
project: Option<PathBuf>,
older_than: Option<String>,
force: bool,
},
}
#[derive(Debug, Clone)]
pub struct CacheOptions {
pub action: CacheAction,
}
#[derive(Debug, Clone)]
pub enum QueryKind {
WhoImports,
WhereSymbol,
ComponentOf,
}
#[derive(Debug, Clone)]
pub struct QueryOptions {
pub kind: QueryKind,
pub target: String,
}