Skip to content

Commit

Permalink
Merge pull request #1062 from epage/cpp
Browse files Browse the repository at this point in the history
fix(dict): Don't correct countr_one
  • Loading branch information
epage authored Jul 25, 2024
2 parents 3ddcf00 + 5aa093d commit 7461343
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 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
5 changes: 5 additions & 0 deletions crates/typos-cli/tests/cmd/false-positives.in/sample.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int main() {
uint8 i = 0;
std::countr_one(i);
return 0;
}

0 comments on commit 7461343

Please sign in to comment.