From 7a2a5042a17f72a369e8b2ad144b6642fc2d3791 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 2 Jul 2021 10:24:59 -0500 Subject: [PATCH 1/2] refactor(dict): Remove useless entries --- crates/typos-dict/assets/words.csv | 8 +------- crates/typos-dict/src/dict_codegen.rs | 22 ++++------------------ 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/crates/typos-dict/assets/words.csv b/crates/typos-dict/assets/words.csv index 6b26836..fac31ff 100644 --- a/crates/typos-dict/assets/words.csv +++ b/crates/typos-dict/assets/words.csv @@ -240,8 +240,6 @@ authobiographic,autobiographic awknowledgement,acknowledgement bureaucratische,bureaucratic cardiovascualar,cardiovascular -carnagie-mellon,carnegie-mellon -carnigie-mellon,carnegie-mellon celebrationists,celebrations charactaristics,characteristics characterisitcs,characteristics @@ -11263,7 +11261,6 @@ climatiser,climates clincially,clinically clitoridis,clitoris clitorious,clitoris -co-incided,coincided cockroachs,cockroaches cockroahes,cockroaches coefficent,coefficient @@ -17307,7 +17304,6 @@ clitorius,clitoris clucthing,clutching clutchign,clutching cluthcing,clutching -coca cola,coca-cola cockatils,cocktails cocktials,cocktails cognizent,cognizant @@ -18900,7 +18896,6 @@ nessecary,necessary newcaslte,newcastle newcastel,newcastle nieghbour,neighbour -nightfa;;,nightfall nightlcub,nightclub nigthclub,nightclub nigthlife,nightlife @@ -24748,7 +24743,7 @@ algerba,algebra alienet,alienate alledge,allege allegry,allergy -alltime,all-time +alltime almighy,almighty alochol,alcohol alotted,allotted @@ -27551,7 +27546,6 @@ offred,offered omited,omitted ouevre,oeuvre oxigen,oxygen -p0enis,penis packge,package peaple,people pensle,pencil diff --git a/crates/typos-dict/src/dict_codegen.rs b/crates/typos-dict/src/dict_codegen.rs index 4dd5e85..0ea98cf 100644 --- a/crates/typos-dict/src/dict_codegen.rs +++ b/crates/typos-dict/src/dict_codegen.rs @@ -8,23 +8,9 @@ pub static WORD_TRIE: dictgen::DictTrie<&'static [&'static str]> = dictgen::Dict }; pub static WORD_UNICODE_TABLE: dictgen::DictTable<&'static [&'static str]> = dictgen::DictTable { - keys: &[ - dictgen::InsensitiveStr::Ascii("carnagie-mellon"), - dictgen::InsensitiveStr::Ascii("carnigie-mellon"), - dictgen::InsensitiveStr::Ascii("co-incided"), - dictgen::InsensitiveStr::Ascii("coca cola"), - dictgen::InsensitiveStr::Ascii("nightfa;;"), - dictgen::InsensitiveStr::Ascii("p0enis"), - ], - values: &[ - &["carnegie-mellon"], - &["carnegie-mellon"], - &["coincided"], - &["coca-cola"], - &["nightfall"], - &["penis"], - ], - range: 6..=15, + keys: &[], + values: &[], + range: 0..=0, }; static WORD_NODE: dictgen::DictTrieNode<&'static [&'static str]> = dictgen::DictTrieNode { @@ -88918,7 +88904,7 @@ pub static WORD_ALL_CHILDREN: dictgen::DictTable<&'static [&'static str]> = dict &["allophones"], &["already"], &["although"], - &["all-time"], + &[], &["altogether"], ], range: 3..=9, From a6ad5c0a0bd491aebf9c2ec8d2ee719be635f170 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 2 Jul 2021 10:28:31 -0500 Subject: [PATCH 2/2] chore(ci): Fix codegen verify --- .github/workflows/codegen.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index 764fc2d..0f62b60 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -29,6 +29,7 @@ jobs: toolchain: 1.53.0 # MSRV profile: minimal override: true + components: rustfmt - uses: Swatinem/rust-cache@v1 - name: Verify typos-dict run: |