Compare commits
1 Commits
ad00301ac9
...
6102b1b8c8
| Author | SHA1 | Date | |
|---|---|---|---|
| 6102b1b8c8 |
@@ -5,9 +5,7 @@ use std::process::ExitCode;
|
|||||||
use xatu::{Report, SourceFile};
|
use xatu::{Report, SourceFile};
|
||||||
|
|
||||||
fn main() -> ExitCode {
|
fn main() -> ExitCode {
|
||||||
let args = Args::parse();
|
match analyze(Args::parse()) {
|
||||||
|
|
||||||
match analyze(args) {
|
|
||||||
Ok(report) if report.is_clean() => {
|
Ok(report) if report.is_clean() => {
|
||||||
println!("No findings.");
|
println!("No findings.");
|
||||||
ExitCode::SUCCESS
|
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> {
|
fn analyze(args: Args) -> status::Result<Report> {
|
||||||
let paths: Vec<PathBuf> = args
|
let paths: Vec<PathBuf> = args
|
||||||
.paths
|
.paths
|
||||||
@@ -47,6 +39,12 @@ fn analyze(args: Args) -> status::Result<Report> {
|
|||||||
xatu::future_sight(files)
|
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>> {
|
fn collect_source_files(path: &Path) -> status::Result<Vec<SourceFile>> {
|
||||||
let metadata = std::fs::symlink_metadata(path)
|
let metadata = std::fs::symlink_metadata(path)
|
||||||
.with_context(|| format!("failed to read metadata for {}", path.display()))?;
|
.with_context(|| format!("failed to read metadata for {}", path.display()))?;
|
||||||
|
|||||||
Reference in New Issue
Block a user