diff --git a/crates/typos-dict/assets/allowed.csv b/crates/typos-dict/assets/allowed.csv index 695f2f558..5c19ae0fc 100644 --- a/crates/typos-dict/assets/allowed.csv +++ b/crates/typos-dict/assets/allowed.csv @@ -1,17 +1,18 @@ -nilable,used in ruby community -thead,html tag -hardlinked,filesystem term -referer,http header field +accreting,verb of accrete +contiguities,plural of contiguity deques,noun dequeues,verb -ons,so `add-ons` works -accreting,verb of accrete -zar,currency code for the South African rand -simulative,adjective -pervious,adjective -perviously,adverb +hardlinked,filesystem term intension,noun intensional,adjective intensionally,adverb +nilable,used in ruby community +ons,so `add-ons` works +pervious,adjective +perviously,adverb +referer,http header field +simulative,adjective +spawnve,Microsoft-specific function (see https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/spawnve) +thead,html tag unuseful,adjective -contiguities,plural of contiguity +zar,currency code for the South African rand diff --git a/crates/typos-dict/assets/words.csv b/crates/typos-dict/assets/words.csv index 8d8af1eeb..f67944f37 100644 --- a/crates/typos-dict/assets/words.csv +++ b/crates/typos-dict/assets/words.csv @@ -53505,7 +53505,6 @@ spawing,spawning spawining,spawning spawnig,spawning spawnign,spawning -spawnve,spawn spaws,spawns spcae,space spcaed,spaced diff --git a/crates/typos-dict/src/dict_codegen.rs b/crates/typos-dict/src/dict_codegen.rs index 31c764c15..69127ed82 100644 --- a/crates/typos-dict/src/dict_codegen.rs +++ b/crates/typos-dict/src/dict_codegen.rs @@ -33487,7 +33487,6 @@ pub static WORD_SPA_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict dictgen::InsensitiveStr::Ascii("wining"), dictgen::InsensitiveStr::Ascii("wnig"), dictgen::InsensitiveStr::Ascii("wnign"), - dictgen::InsensitiveStr::Ascii("wnve"), dictgen::InsensitiveStr::Ascii("ws"), ], values: &[ @@ -33542,7 +33541,6 @@ pub static WORD_SPA_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict &["spawning"], &["spawning"], &["spawning"], - &["spawn"], &["spawns"], ], range: 1..=11, diff --git a/crates/typos-dict/tests/verify.rs b/crates/typos-dict/tests/verify.rs index 560b095eb..bd01cc341 100644 --- a/crates/typos-dict/tests/verify.rs +++ b/crates/typos-dict/tests/verify.rs @@ -1,4 +1,5 @@ use indexmap::IndexSet; +use itertools::Itertools; use std::collections::BTreeMap; use std::collections::HashMap; use std::collections::HashSet; @@ -253,3 +254,18 @@ fn allowed_words() -> std::collections::HashMap { }) .collect() } + +#[test] +fn allowed_csv_entries_are_sorted_and_unique() { + // The order in the csv file does not affect runtime behavior, but we + // still want them to be sorted to make the file more human-readable. + snapbox::assert_eq_path( + "assets/allowed.csv", + allowed_words() + .iter() + .sorted() + .unique() + .map(|(word, reason)| format!("{word},{reason}\n")) + .join(""), + ); +}