Skip to content

Commit

Permalink
fix(dict): Don't correct countr_one
Browse files Browse the repository at this point in the history
Fixes #1061
  • Loading branch information
epage committed Jul 25, 2024
1 parent de9928a commit 5aa093d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 9 additions & 0 deletions crates/typos-cli/src/file_type_specifics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
pub(crate) const NO_CHECK_TYPES: &[&str] = &["cert", "lock"];

pub(crate) const TYPE_SPECIFIC_DICTS: &[(&str, StaticDictConfig)] = &[
(
"cpp",
StaticDictConfig {
ignore_idents: &[
"countr_one", // `std::countr_one`
],
ignore_words: &[],
},
),
(
"css",
StaticDictConfig {
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: `countr` should be `counter`, `contour`, `country`, `county`
--> ./sample.cpp:3:10
|
3 | std::countr_one(i);
| ^^^^^^
|
"""
stdout = ""
stderr = ""
status.code = 2

0 comments on commit 5aa093d

Please sign in to comment.