Repository navigation
Describe running lint and spellcheck locally in README/Contributing guide #2338
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
Changes from 1 commit
6dfa2b3
945b213
efb7b46
250f98e
b88d052
9ddc9a8
6ec177e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,3 +84,28 @@ every time you commit, install the hooks with ``pre-commit install``. | |
| Then, whenever you ``git commit``, pre-commit will run and report any issues | ||
| it finds or changes it makes, and abort the commit to allow you to check, | ||
| and if necessary correct them before committing again. | ||
|
|
||
|
|
||
| Check and fix PEP spelling | ||
| -------------------------- | ||
|
|
||
| To check for common spelling mistakes in your PEP and automatically suggest | ||
| corrections, you can run the codespell tool through pre-commit as well. | ||
|
|
||
| Like the linters, on a system with ``make`` available, it can be installed | ||
| (in the currently-activated environment) and run on all files in the | ||
| repository with a single command, ``make spellcheck``. | ||
|
|
||
| For finer control or on other systems, after installing pre-commit as above | ||
| (e.g. ``pip install pre-commit``), you can run it against only the files | ||
| you've modified and not yet committed with | ||
| ``pre-commit run --hook-stage manual codespell``, or against all files with | ||
| ``pre-commit run --all-files --hook-stage manual codespell``. | ||
|
|
||
| **Note**: While fixing spelling mistakes as part of more substantive | ||
|
Member
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. Perhaps even make this a subheading so we can easily link to it?
Member
Author
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. Hmm, I guess we could, but after playing around with it I'm not sure it fits well as a full section, nor what a good title for it would be. We can just link the PEP spelling heading, no? Its not like such PRs have been that frequent here...
Member
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. Sure, that'll be fine.
Member
Author
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. Actually, after some discussion on #2350 , I think it would be a good idea to make this a top-level section to discuss what our general policy for changing older PEPs, what contributions are helpful, and which are likely to be declined, I'll modify it accordingly.
Member
Author
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. Err, further revision—after I started drafting text for this section, given this is a broader policy than what was originally envisioned here and might require additional discussion, I think it would be best to keep this PR in scope and add this in an immediate follow-up. I also drafted some other updates for other out of date parts of the contributing guide and readme which can also be handled separately (in this case independently, since they don't conflict with either of these changes). |
||
| copyediting and proofreading of draft and active PEPs is okay, | ||
| we generally advise against PRs that simply mass-correct minor typos on | ||
| older PEPs that don't significantly impair meaning and understanding, | ||
| as these tend to create a fairly high level of noise and churn for | ||
| PEP readers, authors and editors relative to the amount of practical value | ||
| they provide. | ||
Uh oh!
There was an error while loading. Please reload this page.