workflows: add spell checker for PR changes#7432
Conversation
|
I think the new pre-commit checks have codespell now |
|
Yes... ardupilot_wiki/.pre-commit-config.yaml Lines 8 to 13 in a6c3173 |
Indeed, and it seems #7479 + #7480 conveniently ignored my concerns1 from #7426, which were the problem I was addressing with this PR (at the request/suggestion of @cclauss at the time). Anyway, I don't plan to put more work into this - hopefully the issue ends up being insignificant 🤷♂️ Footnotes
|
@cclauss has also fixed all problems that codespell has raised. codespell doesn't actually check every word for being in a dictionary - it just looks for common mis-spellings. |
Following on from discussion in #7426, this PR adds a workflow for codespell checking to the lines added1 in a PR.
The idea is that contributors and reviewers/maintainers can evaluate whether errors need fixing on a case-by-case basis, and choose to ignore them if they want to. It does still check the unchanged words in a line that was changed, but that seems unlikely to cause substantial issues or overhead.
Example output can be found here.
As a somewhat related note, it seems my assumption that codespell works like other spell checkers is incorrect, and in fact:
Given that, I agree we should consider @cclauss's idea of re-running it on all/most files at some kind of regular interval, but ideally that should be just when the library version gets updated (when there are likely to be new words in the dictionary). I haven't added it in this workflow, because I don't think PR contributors should need to be flagged for errors unrelated to their changes - if we add that it can be in a dedicated workflow that's independent of the PR process.
Footnotes
"added" can be completely new lines, or modified lines (which diff considers as a deleted line and a new line to replace it). It does not check any removed content. ↩