mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 09:01:04 -05:00
fix: Only check filename, not parent dirs
This commit is contained in:
parent
94ee49b068
commit
54aaffed49
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ impl Checks {
|
|||
return Ok(typos_found);
|
||||
}
|
||||
|
||||
for part in path.components().filter_map(|c| c.as_os_str().to_str()) {
|
||||
if let Some(part) = path.file_name().and_then(|s| s.to_str()) {
|
||||
for ident in parser.parse(part) {
|
||||
if let Some(correction) = dictionary.correct_ident(ident) {
|
||||
let msg = report::FilenameCorrection {
|
||||
|
|
Loading…
Reference in a new issue