1
0
Fork 0
mirror of https://github.com/archtechx/todo-system.git synced 2025-12-12 09:04:03 +00:00

recursively scan .gitignore files for excludes

This commit is contained in:
Samuel Štancl 2023-11-24 03:23:48 +01:00
parent a346a61c7c
commit dcbb07ac46
4 changed files with 38 additions and 4 deletions

View file

@ -1,7 +1,7 @@
use std::path::PathBuf;
use clap::Parser;
use scan::scan_readme_file;
use scan::{scan_readme_file, add_excludes_from_gitignore};
use crate::entries::Entry;
use crate::render::render_entries;
use crate::scan::{Stats, scan_dir, scan_todo_file};
@ -86,8 +86,10 @@ fn main() {
scan_readme_file(&readme_path, &mut entries).unwrap();
}
add_excludes_from_gitignore(&root_dir, &mut excludes);
for p in &paths {
scan_dir(p.as_path(), &mut entries, &excludes, &mut stats).unwrap();
scan_dir(p.as_path(), &mut entries, &mut excludes, &mut stats).unwrap();
}
render_entries(entries);