From 37c354f8a290df0f8570f5986b1724cadc1ca080 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 18 Sep 2024 11:23:11 +0100 Subject: [PATCH] feat: log progress --- src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 94f3a39..02eb5e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -87,6 +87,7 @@ fn scan_files(config: &Config, found_markers: &mut FoundMarkers) -> Result<()> { } fn scan_dir(dir: &Path, config: &Config, found_markers: &mut FoundMarkers) -> Result<()> { + println!("dir : {}", dir.to_string_lossy()); let read_dir = config.fs.dir_read(dir)?; for entry in read_dir { match entry? { @@ -98,14 +99,16 @@ fn scan_dir(dir: &Path, config: &Config, found_markers: &mut FoundMarkers) -> Re Ok(()) } -fn scan_file(path: &Path, config: &Config, found_markers: &mut FoundMarkers) -> Result<()> { +fn scan_file(file: &Path, config: &Config, found_markers: &mut FoundMarkers) -> Result<()> { + println!("file: {}", file.to_string_lossy()); config .fs - .file_read_to_string(path)? + .file_read_to_string(file)? .lines() .enumerate() - .filter_map(|(n, line)| prefix_match(n, line, path, config)) + .filter_map(|(n, line)| prefix_match(n, line, file, config)) .for_each(|marker| { + println!("- {}", marker.line.value); if let Some(issue) = config .issue_pattern .find(&marker.line.value)