fix(dict): Don't correct dBA

I went with the direct unit which will be considered and identifier by
the casing, rather than also allowing this as a word.

Fixes #997
This commit is contained in:
Ed Page 2024-04-16 11:37:04 -05:00
parent 56df0bd8d6
commit ee32d77aba
2 changed files with 2 additions and 9 deletions

View file

@ -54,6 +54,7 @@ impl BuiltIn {
fn correct_ident_with_dict<'s>(&self, ident: &str) -> Option<Status<'s>> { fn correct_ident_with_dict<'s>(&self, ident: &str) -> Option<Status<'s>> {
match ident { match ident {
"O_WRONLY" => Some(Status::Valid), "O_WRONLY" => Some(Status::Valid),
"dBA" => Some(Status::Valid),
_ => None, _ => None,
} }
} }

View file

@ -1,12 +1,4 @@
bin.name = "typos" bin.name = "typos"
stdin = "" stdin = ""
stdout = """ stdout = ""
error: `BA` should be `BY`, `BE`
--> ./sample.txt:1:21
|
1 | Audio volume: 23.6 dBA
| ^^
|
"""
stderr = "" stderr = ""
status.code = 2