mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-24 18:10:56 -05:00
refactor(cli): Be explicit in overrides
This commit is contained in:
parent
0e8148fbbd
commit
777cf42dc2
1 changed files with 11 additions and 1 deletions
|
@ -261,7 +261,17 @@ fn run_checks(args: &args::Args) -> proc_exit::ExitResult {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
walk.overrides(overrides);
|
walk.filter_entry(move |entry| {
|
||||||
|
let path = entry.path();
|
||||||
|
let is_dir = entry.file_type().map(|t| t.is_dir()).unwrap_or(false);
|
||||||
|
let matched = overrides.matched(path, is_dir);
|
||||||
|
log::debug!("match({path:?}, {is_dir}) == {matched:?}");
|
||||||
|
match matched {
|
||||||
|
ignore::Match::None => true,
|
||||||
|
ignore::Match::Ignore(_) => false,
|
||||||
|
ignore::Match::Whitelist(_) => true,
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: Diff doesn't handle mixing content
|
// HACK: Diff doesn't handle mixing content
|
||||||
|
|
Loading…
Reference in a new issue