From d08da09de1ec31110da223648ac4674ca1a1ea7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 27 Nov 2023 02:21:41 +0100 Subject: [PATCH] more gitignore logic improvements --- src/main.rs | 4 +--- src/scan.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index afb7140..d21f4cd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ use std::fs::canonicalize; use std::path::PathBuf; use clap::{Parser, ArgAction}; -use scan::{scan_readme_file, add_excludes_from_gitignore}; +use scan::scan_readme_file; use crate::entries::Entry; use crate::render::render_entries; use crate::scan::{Stats, scan_dir, scan_todo_file}; @@ -92,8 +92,6 @@ 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, &mut excludes, &mut stats).unwrap(); } diff --git a/src/scan.rs b/src/scan.rs index 647c37c..ef216d1 100644 --- a/src/scan.rs +++ b/src/scan.rs @@ -107,6 +107,10 @@ pub fn add_excludes_from_gitignore(base_dir: &PathBuf, excludes: &mut Vec