Skip to content

Commit

Permalink
Read user config for every file we want to scan
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Aug 30, 2024
1 parent dc9c47a commit 56b95f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@ fn main() -> anyhow::Result<()> {
};

for path in args.paths {
dispatcher.user_config = get_user_config(&path)?;

for entry in walkdir::WalkDir::new(path) {
match entry {
Err(err) => eprintln!("{:}", err),
Ok(entry) if entry.file_type().is_file() => check_file(&dispatcher, entry.path()),
Ok(entry) if entry.file_type().is_file() => {
let entry_path = entry.path();
dispatcher.user_config = get_user_config(entry_path)?;
check_file(&dispatcher, entry_path);
}
Ok(_) => {}
}
}
Expand Down

0 comments on commit 56b95f9

Please sign in to comment.