Skip to content

Commit

Permalink
refactor!: Move dict implementation into CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Page committed Oct 28, 2019
1 parent 5de368a commit ce1ef2c
Show file tree
Hide file tree
Showing 13 changed files with 35,623 additions and 35,726 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ codecov = { repository = "crate-ci/typos" }
[dependencies]
typos = { version = "0.1", path = "typos" }
typos-dict = { version = "0.1", path = "dict/typos" }
phf = { version = "0.8", features = ["unicase"] }
unicase = "2.5"
failure = "0.1"
structopt = "0.3"
clap = "2"
Expand Down
1 change: 0 additions & 1 deletion dict/codespell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ azure-devops = { project = "crate-ci", pipeline = "typos" }
codecov = { repository = "crate-ci/typos" }

[dependencies]
typos = { version = "0.1", path = "../../typos" }
phf = { version = "0.8", features = ["unicase"] }
unicase = "2.5"
log = "0.4"
2 changes: 1 addition & 1 deletion dict/codespell/codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn generate<W: std::io::Write>(file: &mut W) {

writeln!(
file,
"pub(crate) static WORD_DICTIONARY: phf::Map<unicase::UniCase<&'static str>, &[&'static str]> = ",
"pub static WORD_DICTIONARY: phf::Map<unicase::UniCase<&'static str>, &[&'static str]> = ",
)
.unwrap();
let mut builder = phf_codegen::Map::new();
Expand Down
98 changes: 0 additions & 98 deletions dict/codespell/src/dict.rs

This file was deleted.

2 changes: 1 addition & 1 deletion dict/codespell/src/dict_codegen.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is code-genned by codespell-codegen

use unicase::UniCase;
pub(crate) static WORD_DICTIONARY: phf::Map<unicase::UniCase<&'static str>, &[&'static str]> =
pub static WORD_DICTIONARY: phf::Map<unicase::UniCase<&'static str>, &[&'static str]> =
::phf::Map {
key: 3213172566270843353,
disps: ::phf::Slice::Static(&[
Expand Down
3 changes: 1 addition & 2 deletions dict/codespell/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod dict;
mod dict_codegen;

pub use crate::dict::*;
pub use crate::dict_codegen::*;
1 change: 0 additions & 1 deletion dict/typos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ azure-devops = { project = "crate-ci", pipeline = "typos" }
codecov = { repository = "crate-ci/typos" }

[dependencies]
typos = { version = "0.1", path = "../../typos" }
phf = { version = "0.8", features = ["unicase"] }
unicase = "2.5"
log = "0.4"
2 changes: 1 addition & 1 deletion dict/typos/codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn generate<W: std::io::Write>(file: &mut W) {

writeln!(
file,
"pub(crate) static WORD_DICTIONARY: phf::Map<unicase::UniCase<&'static str>, &'static str> = "
"pub static WORD_DICTIONARY: phf::Map<unicase::UniCase<&'static str>, &'static str> = "
)
.unwrap();
let mut builder = phf_codegen::Map::new();
Expand Down
Loading

0 comments on commit ce1ef2c

Please sign in to comment.