From 8f428b8fec9d9abfca996ddfe895fa0ed627927c Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 28 Oct 2019 08:19:47 -0600 Subject: [PATCH] refactor(dict): Prepare for more dicts --- .gitattributes | 1 - Cargo.toml | 4 ++-- azure-pipelines.yml | 2 +- {typos-dict => dict/typos}/Cargo.toml | 4 ++-- dict/typos/assets/.gitattributes | 1 + {typos-dict => dict/typos}/assets/main.go | 0 {typos-dict => dict/typos}/assets/words.csv | 0 {typos-dict => dict/typos}/assets/words.go | 0 {codegen => dict/typos/codegen}/Cargo.toml | 2 +- {codegen => dict/typos/codegen}/src/main.rs | 0 {typos-dict => dict/typos}/src/dict.rs | 0 {typos-dict => dict/typos}/src/dict_codegen.rs | 0 {typos-dict => dict/typos}/src/lib.rs | 0 13 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 .gitattributes rename {typos-dict => dict/typos}/Cargo.toml (87%) create mode 100644 dict/typos/assets/.gitattributes rename {typos-dict => dict/typos}/assets/main.go (100%) rename {typos-dict => dict/typos}/assets/words.csv (100%) rename {typos-dict => dict/typos}/assets/words.go (100%) rename {codegen => dict/typos/codegen}/Cargo.toml (94%) rename {codegen => dict/typos/codegen}/src/main.rs (100%) rename {typos-dict => dict/typos}/src/dict.rs (100%) rename {typos-dict => dict/typos}/src/dict_codegen.rs (100%) rename {typos-dict => dict/typos}/src/lib.rs (100%) diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index b0d407b..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -typos-dict/assets/* linguist-vendored diff --git a/Cargo.toml b/Cargo.toml index 8733acd..5c3fe28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["codegen", "typos", "typos-dict"] +members = ["typos", "dict/typos", "dict/typos/codegen"] [package] name = "typos-cli" @@ -24,7 +24,7 @@ codecov = { repository = "crate-ci/typos" } [dependencies] typos = { version = "0.1", path = "typos" } -typos-dict = { version = "0.1", path = "typos-dict" } +typos-dict = { version = "0.1", path = "dict/typos" } failure = "0.1" structopt = "0.3" clap = "2" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5707d43..2ae8188 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,7 +25,7 @@ stages: steps: - template: azure/install-rust.yml@templates - script: | - cargo run --package typos-codegen -- --input typos-dict/assets/words.csv --output typos-dict/src/dict_codegen.rs --check + cargo run --package typos-codegen -- --input dict/typos/assets/words.csv --output dict/typos/src/dict_codegen.rs --check displayName: Verify Code-gen - stage: committed displayName: Lint History diff --git a/typos-dict/Cargo.toml b/dict/typos/Cargo.toml similarity index 87% rename from typos-dict/Cargo.toml rename to dict/typos/Cargo.toml index 49deaea..5b65b73 100644 --- a/typos-dict/Cargo.toml +++ b/dict/typos/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.1" authors = ["Ed Page "] description = "Source Code Spelling Correction" repository = "https://github.com/crate-ci/typos" -readme = "../README.md" +readme = "../../README.md" categories = ["development-tools", "text-processing"] keywords = ["development", "spelling"] license = "MIT" @@ -15,7 +15,7 @@ azure-devops = { project = "crate-ci", pipeline = "typos" } codecov = { repository = "crate-ci/typos" } [dependencies] -typos = { version = "0.1", path = "../typos" } +typos = { version = "0.1", path = "../../typos" } phf = { version = "0.8", features = ["unicase"] } unicase = "2.5" log = "0.4" diff --git a/dict/typos/assets/.gitattributes b/dict/typos/assets/.gitattributes new file mode 100644 index 0000000..36eaad9 --- /dev/null +++ b/dict/typos/assets/.gitattributes @@ -0,0 +1 @@ +* linguist-vendored diff --git a/typos-dict/assets/main.go b/dict/typos/assets/main.go similarity index 100% rename from typos-dict/assets/main.go rename to dict/typos/assets/main.go diff --git a/typos-dict/assets/words.csv b/dict/typos/assets/words.csv similarity index 100% rename from typos-dict/assets/words.csv rename to dict/typos/assets/words.csv diff --git a/typos-dict/assets/words.go b/dict/typos/assets/words.go similarity index 100% rename from typos-dict/assets/words.go rename to dict/typos/assets/words.go diff --git a/codegen/Cargo.toml b/dict/typos/codegen/Cargo.toml similarity index 94% rename from codegen/Cargo.toml rename to dict/typos/codegen/Cargo.toml index 3c86c7b..05399e4 100644 --- a/codegen/Cargo.toml +++ b/dict/typos/codegen/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.1" authors = ["Ed Page "] description = "Source Code Spelling Correction" repository = "https://github.com/crate-ci/typos" -readme = "../README.md" +readme = "../../../README.md" categories = ["text-processing"] license = "MIT" edition = "2018" diff --git a/codegen/src/main.rs b/dict/typos/codegen/src/main.rs similarity index 100% rename from codegen/src/main.rs rename to dict/typos/codegen/src/main.rs diff --git a/typos-dict/src/dict.rs b/dict/typos/src/dict.rs similarity index 100% rename from typos-dict/src/dict.rs rename to dict/typos/src/dict.rs diff --git a/typos-dict/src/dict_codegen.rs b/dict/typos/src/dict_codegen.rs similarity index 100% rename from typos-dict/src/dict_codegen.rs rename to dict/typos/src/dict_codegen.rs diff --git a/typos-dict/src/lib.rs b/dict/typos/src/lib.rs similarity index 100% rename from typos-dict/src/lib.rs rename to dict/typos/src/lib.rs