mirror of
https://github.com/crate-ci/typos.git
synced 2024-12-22 15:42:23 -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(".");
|
||||
for pattern in walk_policy.extend_exclude.iter() {
|
||||
overrides
|
||||
.add(&format!("!{pattern}"))
|
||||
.add(pattern)
|
||||
.with_code(proc_exit::sysexits::CONFIG_ERR)?;
|
||||
}
|
||||
let overrides = overrides
|
||||
|
@ -268,8 +268,8 @@ fn run_checks(args: &args::Args) -> proc_exit::ExitResult {
|
|||
log::debug!("match({path:?}, {is_dir}) == {matched:?}");
|
||||
match matched {
|
||||
ignore::Match::None => true,
|
||||
ignore::Match::Ignore(_) => false,
|
||||
ignore::Match::Whitelist(_) => true,
|
||||
ignore::Match::Ignore(_) => true,
|
||||
ignore::Match::Whitelist(_) => false,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
bin.name = "typos"
|
||||
stdin = ""
|
||||
stdout = ""
|
||||
stdout = """
|
||||
error: `hte` should be `the`
|
||||
--> ./checked/file.txt:1:1
|
||||
|
|
||||
1 | hte
|
||||
| ^^^
|
||||
|
|
||||
"""
|
||||
stderr = ""
|
||||
status.code = 2
|
||||
|
|
Loading…
Reference in a new issue