use crate::config::Config;
use anyhow::Result;
use clap::Args as ClapArgs;
use std::path::PathBuf;
#[derive(Debug, ClapArgs)]
pub struct Args {
input: PathBuf,
#[arg(long)]
remote: bool,
#[arg(short, long)]
verbose: bool,
}
pub async fn run(args: Args) -> Result<()> {
let config = Config::load().unwrap_or_default();
config.init_logging();
tracing::info!("Validating GeoJSON: {}", args.input.display());
tracing::warn!("GeoJSON validation not yet implemented");
Err(anyhow::anyhow!("GeoJSON validation not yet implemented"))
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_validate_args() {
let args = Args {
input: PathBuf::from("test.geojson"),
remote: false,
verbose: true,
};
assert_eq!(args.input, PathBuf::from("test.geojson"));
assert!(!args.remote);
assert!(args.verbose);
}
}