Compare commits

..

1 Commits

Author SHA1 Message Date
6102b1b8c8 docs(rust-style): order declarations by dependency 2026-09-19 17:36:18 -04:00

View File

@@ -5,9 +5,7 @@ use std::process::ExitCode;
use xatu::{Report, SourceFile};
fn main() -> ExitCode {
let args = Args::parse();
match analyze(args) {
match analyze(Args::parse()) {
Ok(report) if report.is_clean() => {
println!("No findings.");
ExitCode::SUCCESS
@@ -23,12 +21,6 @@ fn main() -> ExitCode {
}
}
#[derive(Debug, Parser)]
struct Args {
#[arg(value_name = "PATH", default_value = ".")]
paths: Vec<PathBuf>,
}
fn analyze(args: Args) -> status::Result<Report> {
let paths: Vec<PathBuf> = args
.paths
@@ -47,6 +39,12 @@ fn analyze(args: Args) -> status::Result<Report> {
xatu::future_sight(files)
}
#[derive(Debug, Parser)]
struct Args {
#[arg(value_name = "PATH", default_value = ".")]
paths: Vec<PathBuf>,
}
fn collect_source_files(path: &Path) -> status::Result<Vec<SourceFile>> {
let metadata = std::fs::symlink_metadata(path)
.with_context(|| format!("failed to read metadata for {}", path.display()))?;