mirror of
https://github.com/crate-ci/typos.git
synced 2024-12-22 15:42:23 -05:00
fix: Actuall ignore ignored identifiers
This commit is contained in:
parent
2ee6ef4654
commit
e4d2d0e54d
3 changed files with 2 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -8,11 +8,5 @@ error: `hello` should be `goodbye`
|
|||
1 | hello
|
||||
| ^^^^^
|
||||
|
|
||||
error: `hello` should be `goodbye`
|
||||
--> ./file.ignore:1:1
|
||||
|
|
||||
1 | hello
|
||||
| ^^^^^
|
||||
|
|
||||
"""
|
||||
stderr = ""
|
||||
|
|
Loading…
Reference in a new issue