Skip to content

Commit

Permalink
fix(dict): Don't correct dBA
Browse files Browse the repository at this point in the history
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
  • Loading branch information
epage committed Apr 16, 2024
1 parent 56df0bd commit ee32d77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions crates/typos-cli/src/dict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ impl BuiltIn {
fn correct_ident_with_dict<'s>(&self, ident: &str) -> Option<Status<'s>> {
match ident {
"O_WRONLY" => Some(Status::Valid),
"dBA" => Some(Status::Valid),
_ => None,
}
}
Expand Down
10 changes: 1 addition & 9 deletions crates/typos-cli/tests/cmd/false-positives.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
bin.name = "typos"
stdin = ""
stdout = """
error: `BA` should be `BY`, `BE`
--> ./sample.txt:1:21
|
1 | Audio volume: 23.6 dBA
| ^^
|
"""
stdout = ""
stderr = ""
status.code = 2

0 comments on commit ee32d77

Please sign in to comment.