mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 00:51:11 -05:00
docs: Process for adding to dict
This commit is contained in:
parent
70fbd63b00
commit
b1c473c9c1
1 changed files with 25 additions and 0 deletions
|
@ -27,6 +27,31 @@ Already have an idea? It might be good to first [create an issue][new issue]
|
|||
to propose it so we can make sure we are aligned and lower the risk of having
|
||||
to re-work some of it and the discouragement that goes along with that.
|
||||
|
||||
### Adding typos
|
||||
|
||||
1. Add your type to our data file `crates/typos-dict/assets/words.csv`
|
||||
|
||||
Format: `typo,correction[,correction...]`
|
||||
|
||||
2. Verify your change
|
||||
|
||||
Run
|
||||
```bash
|
||||
cargo run --package typos-dict-verify -- --input crates/typos-dict/assets/words.csv --output crates/typos-dict/assets/words.csv
|
||||
```
|
||||
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. Code-gen the dictionary
|
||||
|
||||
Run
|
||||
```bash
|
||||
cargo run --package typos-dict-codegen -- --output crates/typos-dict/src/dict_codegen.rs
|
||||
```
|
||||
(we do development-time code-gen to speed up builds)
|
||||
|
||||
### Process
|
||||
|
||||
When you first post a PR, we request that the commit history get cleaned
|
||||
|
|
Loading…
Reference in a new issue