-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
docs(typos): Run codespell to fix typos #3980
Conversation
There were a lot of typos through the repository, so I ran [codespell][], a tool for automatically fixing typos, to fix them. ```console make codespell ``` There's already a tool called [misspell][] that's supposed to take care of this, but misspell hasn't been updated for 6 years, and it doesn't seem to be catching any of the typos that codespell can. [codespell]: https://github.com/codespell-project/codespell [misspell]: https://github.com/client9/misspell
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3980 +/- ##
=====================================
Coverage 82.1% 82.1%
=====================================
Files 174 174
Lines 12975 12975
=====================================
+ Hits 10653 10655 +2
+ Misses 2102 2100 -2
Partials 220 220
|
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.
Can we move the automation (Makefile
and GitHub Actions) to a separate PR?
Yes, I'll remove it from this PR for now and file another PR afterwards. Thanks @pellared |
Per @pellared, since there's no instructions for setting up codespell, it was suggested that the changes for setting up a workflow and section in Makefile include instructions for setting up codespell as well.
This is a followup from open-telemetry#3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn
* feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from #3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
There were a lot of typos through the repository, so I ran codespell, a tool for automatically fixing typos, to fix them.
make codespell
There's already a tool called misspell that's supposed to take care of this, but misspell hasn't been updated for 6 years, and it doesn't seem to be catching any of the typos that codespell can.
To make this more automatic, perhaps we can set up a workflow to run codespell as well?
cc: @alolita