fix: Actuall ignore ignored identifiers

This commit is contained in:
Ed Page 2023-03-17 23:47:25 -05:00
parent 2ee6ef4654
commit e4d2d0e54d
3 changed files with 2 additions and 7 deletions

View file

@ -249,7 +249,7 @@ impl<'i, 'w, D: typos::Dictionary> typos::Dictionary for Override<'i, 'w, D> {
fn correct_ident<'s, 't>(&'s self, ident: typos::tokens::Identifier<'t>) -> Option<Status<'s>> {
for ignored in &self.ignored_identifiers {
if ignored.is_match(ident.token()) {
return None;
return Some(Status::Valid);
}
}

View file

@ -239,6 +239,7 @@ impl<'s> ConfigEngine<'s> {
let dict = crate::dict::BuiltIn::new(dict_config.locale());
let mut dict = crate::dict::Override::new(dict);
dict.ignored_identifiers(dict_config.extend_ignore_identifiers_re());
dict.identifiers(
dict_config
.extend_identifiers()

View file

@ -8,11 +8,5 @@ error: `hello` should be `goodbye`
1 | hello
| ^^^^^
|
error: `hello` should be `goodbye`
--> ./file.ignore:1:1
|
1 | hello
| ^^^^^
|
"""
stderr = ""