-
Notifications
You must be signed in to change notification settings - Fork 143
docs: Improve CONTRIBUTING.md #800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
not-my-profile
wants to merge
5
commits into
crate-ci:master
Choose a base branch
from
not-my-profile:improve-contributing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
967d6d7
docs(contrib): Move description of SNAPSHOTS=overwrite to right step
not-my-profile 2f6b2d0
docs(contrib): Fix list indentation
not-my-profile 5b537a0
docs(contrib): Link words.csv and prefer a relative link
not-my-profile b06b7d5
docs(contrib): Suggest cargo test -p typos-dict for dict contribs
not-my-profile b61651b
docs(contrib): Fix steps to work on duplicate entries
not-my-profile File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,28 +37,29 @@ 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...]` | ||
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 --workspace | ||
``` | ||
(we do development-time code-gen to speed up builds) | ||
With `cargo` and `rustfmt` installed, run | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This instruction is for the code-gen one |
||
```console | ||
$ SNAPSHOTS=overwrite cargo test -p typos-dict verify | ||
``` | ||
(we do development-time code-gen to speed up builds) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This belongs in the code-gen section |
||
|
||
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 | ||
3. Code-gen the dictionary | ||
|
||
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 | ||
Run | ||
```console | ||
$ SNAPSHOTS=overwrite cargo test -p typos-dict codegen | ||
``` | ||
|
||
### Process | ||
|
||
|
@@ -98,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/ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the original intention was to run both steps here and then in Step 3, run the command to verify everything is resolved.
There is the annoying aspect though of needing to run verify before codegen