mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-25 10:31:02 -05:00
parent
777cf42dc2
commit
d9b55f966c
2 changed files with 12 additions and 4 deletions
|
@ -244,7 +244,7 @@ fn run_checks(args: &args::Args) -> proc_exit::ExitResult {
|
||||||
let mut overrides = ignore::overrides::OverrideBuilder::new(".");
|
let mut overrides = ignore::overrides::OverrideBuilder::new(".");
|
||||||
for pattern in walk_policy.extend_exclude.iter() {
|
for pattern in walk_policy.extend_exclude.iter() {
|
||||||
overrides
|
overrides
|
||||||
.add(&format!("!{pattern}"))
|
.add(pattern)
|
||||||
.with_code(proc_exit::sysexits::CONFIG_ERR)?;
|
.with_code(proc_exit::sysexits::CONFIG_ERR)?;
|
||||||
}
|
}
|
||||||
let overrides = overrides
|
let overrides = overrides
|
||||||
|
@ -268,8 +268,8 @@ fn run_checks(args: &args::Args) -> proc_exit::ExitResult {
|
||||||
log::debug!("match({path:?}, {is_dir}) == {matched:?}");
|
log::debug!("match({path:?}, {is_dir}) == {matched:?}");
|
||||||
match matched {
|
match matched {
|
||||||
ignore::Match::None => true,
|
ignore::Match::None => true,
|
||||||
ignore::Match::Ignore(_) => false,
|
ignore::Match::Ignore(_) => true,
|
||||||
ignore::Match::Whitelist(_) => true,
|
ignore::Match::Whitelist(_) => false,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
bin.name = "typos"
|
bin.name = "typos"
|
||||||
stdin = ""
|
stdin = ""
|
||||||
stdout = ""
|
stdout = """
|
||||||
|
error: `hte` should be `the`
|
||||||
|
--> ./checked/file.txt:1:1
|
||||||
|
|
|
||||||
|
1 | hte
|
||||||
|
| ^^^
|
||||||
|
|
|
||||||
|
"""
|
||||||
stderr = ""
|
stderr = ""
|
||||||
|
status.code = 2
|
||||||
|
|
Loading…
Reference in a new issue