Compare commits

..

1 Commits

Author SHA1 Message Date
87dc93513b feat(xatu): set CLI exit statuses 2026-09-19 17:06:11 -04:00

View File

@@ -29,18 +29,11 @@ fn is_excluded_dir(path: &Path) -> bool {
}
fn collect_source_files(path: &Path) -> status::Result<Vec<SourceFile>> {
collect_source_files_with_exclusions(path, false)
}
fn collect_source_files_with_exclusions(
path: &Path,
exclude_current_dir: bool,
) -> status::Result<Vec<SourceFile>> {
let metadata = std::fs::symlink_metadata(path)
.with_context(|| format!("failed to read metadata for {}", path.display()))?;
if metadata.file_type().is_dir() {
if exclude_current_dir && is_excluded_dir(path) {
if is_excluded_dir(path) {
return Ok(Vec::new());
}
@@ -51,7 +44,7 @@ fn collect_source_files_with_exclusions(
{
let entry =
entry.with_context(|| format!("failed to read entry in {}", path.display()))?;
files.extend(collect_source_files_with_exclusions(&entry.path(), true)?);
files.extend(collect_source_files(&entry.path())?);
}
return Ok(files);