Skip to content
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

Automatically check for typos using codespell + pre-commit #7689

Closed
pradyunsg opened this issue Feb 2, 2020 · 4 comments · Fixed by #12628
Closed

Automatically check for typos using codespell + pre-commit #7689

pradyunsg opened this issue Feb 2, 2020 · 4 comments · Fixed by #12628
Labels
C: automation Automated checks, CI etc state: needs discussion This needs some more discussion type: maintenance Related to Development and Maintenance Processes

Comments

@pradyunsg
Copy link
Member

It could be worthwhile to look into whether a pre-commit hook spell-checking some files would be more helpful than not.

Originally posted by @chrahunt in #7642 (comment)


Looks like https://github.com/codespell-project/codespell has a pre-commit hook configuration. The configuration change would be to add the following to our .pre-commit-config.yaml file.

- repo: https://github.com/codespell-project/codespell
  rev: v1.16.0
  hooks:
    - id: codespell
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Feb 2, 2020
@pradyunsg pradyunsg added C: automation Automated checks, CI etc type: maintenance Related to Development and Maintenance Processes labels Feb 2, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Feb 2, 2020
@pradyunsg pradyunsg added state: needs discussion This needs some more discussion S: needs triage Issues/PRs that need to be triaged labels Feb 2, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Feb 2, 2020
@chrahunt
Copy link
Member

chrahunt commented Feb 2, 2020

Some targets for this check would be:

  1. docs
  2. news files
  3. README
  4. code comments

What needs investigation is how often we'll get false positives and what the remediation is, but the best way to do that is to add it to the list of checks and submit a PR.

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

Bonus points for integrating sphinx-spellcheck too.

@aphedges
Copy link
Contributor

There is some more recent discussion about Codespell in #10569.

yarikoptic added a commit to yarikoptic/pip that referenced this issue Mar 24, 2023
yarikoptic added a commit to yarikoptic/pip that referenced this issue Mar 27, 2023
yarikoptic added a commit to yarikoptic/pip that referenced this issue Mar 27, 2023
yarikoptic added a commit to yarikoptic/pip that referenced this issue Aug 9, 2023
@webknjaz
Copy link
Member

There is some more recent discussion about Codespell in #10569.

I guess, that'll do. Though per my testing, it's not as good with markup like rst for some reason.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: automation Automated checks, CI etc state: needs discussion This needs some more discussion type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants