Repository navigation
Add codespell support (config, workflow to detect/not fix) and make it fix some typos - #903
Conversation
Signed-off-by: Yaroslav O. Halchenko <[email protected]>
Signed-off-by: Yaroslav O. Halchenko <[email protected]>
…os automagically
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
Signed-off-by: Yaroslav O. Halchenko <[email protected]>
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
bolinfest
left a comment
There was a problem hiding this comment.
Nice! All the fixes are spot-on, so let's try it with the CI.
bolinfest
left a comment
There was a problem hiding this comment.
Out of an abundance of caution, can you please peg these to specific commits rather than tags? Since we don't own these CI jobs, they could change out from under us if we use tags.
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Annotate locations with typos | ||
| uses: codespell-project/codespell-problem-matcher@v1 |
There was a problem hiding this comment.
Hmm, this does not appear to have seen much interest or activity:
There was a problem hiding this comment.
Yep, but it seems just to work in my experience
There was a problem hiding this comment.
Right, I trust that it works today. What I have less confidence in is a bad actor coming in, somehow gaining control of codespell-problem-matcher, changing the v1 tag to point at something else, and anyone noticing.
There was a problem hiding this comment.
yeap, there was a similar concern/practice elsewhere recently (argoproj/argo-workflows#14454) -- I will change now to current commit hashes... ran pin-github-action .github/workflows/codespell.yml and pushed
| - name: Annotate locations with typos | ||
| uses: codespell-project/codespell-problem-matcher@v1 | ||
| - name: Codespell | ||
| uses: codespell-project/actions-codespell@v2 |
There was a problem hiding this comment.
There was a problem hiding this comment.
Sorry, what do you mean, since it is the one listed above
There was a problem hiding this comment.
Copy/paste error: that should have been https://github.com/codespell-project/actions-codespell. It has 21 forks and 80 stars, so it feels like at least some folks are keeping an eye on it.
There was a problem hiding this comment.
I think there is still remaining confusion somewhere. We have two actions and they are complimentary:
codespell-project/codespell-problem-matcher@v1-- this one is just to annotate in the github "files" view where typos are observed. handy but not mandatory, not as popular, no recent developmentscodespell-project/actions-codespell@v2-- the actual action to runcodespellitself.
so I would recommend to keep both. First first one makes no sense without the 2nd one
There was a problem hiding this comment.
I am opting to keep both. I am saying that instead of referencing the actions by tag (@v1, @v2), I would like to reference them by full commit hash so the behavior of the action cannot change out from under us.
There was a problem hiding this comment.
ah, gotcha -- I just pushed replacing with commit hexshas
…ious code ran
=== Do not change lines below ===
{
"chain": [],
"cmd": "pin-github-action .github/workflows/codespell.yml --allow 'actions/*'",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
bolinfest
left a comment
There was a problem hiding this comment.
sorry, one last thing
There was a problem hiding this comment.
This one is fine: this is GitHub's responsibility and if this does something malicious, the whole Internet will break anyway. So please keep this as @v4 so it's easier to eyeball that we're doing something canonical.
|
Thanks @yarikoptic: I'm excited to see this in action! |
More about codespell: https://github.com/codespell-project/codespell .
I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.
CI workflow has 'permissions' set only to 'read' so also should be safe.
Let me know if just want to take typo fixes in and get rid of the CI