From 967d6d751e5ac54af1a98bb8bf7b13f4b3b75487 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 11 Aug 2023 13:36:27 +0200 Subject: [PATCH 1/5] docs(contrib): Move description of SNAPSHOTS=overwrite to right step This text was apparently accidentally moved in 7eb88739501dcce6eaca5089910a94151a91f96b. --- CONTRIBUTING.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31cac6a10..f28e1d8f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,16 +49,17 @@ $ SNAPSHOTS=overwrite cargo test --workspace ``` (we do development-time code-gen to speed up builds) +Auto-cleans up your change according to some rules we have like: +- Don't prefer specific dialects in the dictionary, leaving those to [`varcon`](http://wordlist.aspell.net/varcon-readme/). +- Mixing up corrections and typos +- etc + 3. Verify your change Run ```console $ cargo test --workspace ``` -Auto-cleans up your change according to some rules we have like: -- Don't prefer specific dialects in the dictionary, leaving those to [`varcon`](http://wordlist.aspell.net/varcon-readme/). -- Mixing up corrections and typos -- etc ### Process From 2f6b2d065ed04f7d926ecf20d1ce1266ee33bf6a Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 11 Aug 2023 13:25:56 +0200 Subject: [PATCH 2/5] docs(contrib): Fix list indentation --- CONTRIBUTING.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f28e1d8f6..9bdbdf5a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,27 +39,27 @@ Otherwise, to add to the dictionary: 1. Add your typo to our data file `crates/typos-dict/assets/words.csv` -Format: `typo,correction[,correction...]` + Format: `typo,correction[,correction...]` 2. Code-gen the dictionary -With `cargo` and `rustfmt` installed, run -```console -$ SNAPSHOTS=overwrite cargo test --workspace -``` -(we do development-time code-gen to speed up builds) - -Auto-cleans up your change according to some rules we have like: -- Don't prefer specific dialects in the dictionary, leaving those to [`varcon`](http://wordlist.aspell.net/varcon-readme/). -- Mixing up corrections and typos -- etc + With `cargo` and `rustfmt` installed, run + ```console + $ SNAPSHOTS=overwrite cargo test --workspace + ``` + (we do development-time code-gen to speed up builds) + + Auto-cleans up your change according to some rules we have like: + - Don't prefer specific dialects in the dictionary, leaving those to [`varcon`](http://wordlist.aspell.net/varcon-readme/). + - Mixing up corrections and typos + - etc 3. Verify your change -Run -```console -$ cargo test --workspace -``` + Run + ```console + $ cargo test --workspace + ``` ### Process From 5b537a06624593683d613887547c82fdc81e8e4d Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 11 Aug 2023 13:30:32 +0200 Subject: [PATCH 3/5] docs(contrib): Link words.csv and prefer a relative link --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9bdbdf5a1..af91ab8e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ to be done in bulk in an attempt to lower the barrier for improving the dictiona Otherwise, to add to the dictionary: -1. Add your typo to our data file `crates/typos-dict/assets/words.csv` +1. Add your typo to our data file [crates/typos-dict/assets/words.csv](crates/typos-dict/assets/words.csv) Format: `typo,correction[,correction...]` @@ -99,4 +99,4 @@ When we're ready to release, a project owner should do the following [issues]: https://github.com/crate-ci/typos/issues [new issue]: https://github.com/crate-ci/typos/issues/new [all issues]: https://github.com/crate-ci/typos/issues?utf8=%E2%9C%93&q=is%3Aissue -[CI]: https://github.com/crate-ci/typos/tree/master/.github/workflows +[CI]: ./.github/workflows/ From b06b7d5e0b8dff89253161890578edfb39f216e1 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 11 Aug 2023 13:39:22 +0200 Subject: [PATCH 4/5] docs(contrib): Suggest cargo test -p typos-dict for dict contribs There is no need to build the whole workspace, using `-p typos-dict` spares the contributor from needlessly building 261 crates. --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af91ab8e4..a15936d52 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ Otherwise, to add to the dictionary: With `cargo` and `rustfmt` installed, run ```console - $ SNAPSHOTS=overwrite cargo test --workspace + $ SNAPSHOTS=overwrite cargo test -p typos-dict ``` (we do development-time code-gen to speed up builds) @@ -58,7 +58,7 @@ Otherwise, to add to the dictionary: Run ```console - $ cargo test --workspace + $ cargo test -p typos-dict ``` ### Process From b61651bc49245948c495b764f72e2ba3af30539d Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 11 Aug 2023 14:12:57 +0200 Subject: [PATCH 5/5] docs(contrib): Fix steps to work on duplicate entries The instructions previously instructed the contributor to run `SNAPSHOTS=overwrite cargo test` which will however fail when the added entry is duplicate with: thread 'codegen' panicked at 'Duplicate present: ...' Duplicates have to be removed by firstly running the verify test with SNAPSHOTS=overwrite before you should try running the code generation. These were actually the steps before they were changed in 7eb88739501dcce6eaca5089910a94151a91f96b (which appears to have been an oversight). --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a15936d52..ae52ec975 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,11 +41,11 @@ Otherwise, to add to the dictionary: Format: `typo,correction[,correction...]` -2. Code-gen the dictionary +2. Verify (and postprocess) the dictionary With `cargo` and `rustfmt` installed, run ```console - $ SNAPSHOTS=overwrite cargo test -p typos-dict + $ SNAPSHOTS=overwrite cargo test -p typos-dict verify ``` (we do development-time code-gen to speed up builds) @@ -54,11 +54,11 @@ Otherwise, to add to the dictionary: - Mixing up corrections and typos - etc -3. Verify your change +3. Code-gen the dictionary Run ```console - $ cargo test -p typos-dict + $ SNAPSHOTS=overwrite cargo test -p typos-dict codegen ``` ### Process