-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): Add codespell to Makefile and GitHub Actions (#3996)
* 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 <[email protected]> * 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 <[email protected]> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <[email protected]> Co-authored-by: Damien Mathieu <[email protected]> Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Tyler Yahn <[email protected]>
- Loading branch information
1 parent
c3b48e2
commit 8dcabc3
Showing
8 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ot | ||
fo | ||
te | ||
collison | ||
consequentially |
This file contains 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# https://github.com/codespell-project/codespell | ||
[codespell] | ||
builtin = clear,rare,informal | ||
check-filenames = | ||
check-hidden = | ||
ignore-words = .codespellignore | ||
interactive = 1 | ||
skip = .git,go.mod,go.sum,semconv,venv,.tools | ||
uri-ignore-words-list = * | ||
write = |
This file contains 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: codespell | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
codespell: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Codespell | ||
run: make codespell |
This file contains 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
Thumbs.db | ||
|
||
.tools/ | ||
venv/ | ||
.idea/ | ||
.vscode/ | ||
*.iml | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
codespell==2.2.4 |