Skip to content

Use codespell for spell-checking #17494

Open
@Piedone

Description

Is your feature request related to a problem?

There are typos in the source code. This is not a huge deal, but annoying and messy if it's just executable code, but a bigger issue if it's also in UI strings or documentation, something that a larger amount of people read.

Describe the solution you'd like

Add codespell for spell-checking as a PR check, i.e. in a GitHub Actions workflow. Codespell checks for known misspellings, so unlike spell-checkers that are meant for prose, it works really well for code, with a low false positive rate.

We at Lombiq have been test codespell in parallel with a traditional spell-checker (which we've used for about two years) for the last month, and it works really well. (You can see a run of it here: it runs in about 10s for a codebase of ~60k LOC, including installing it. So, it wouldn't delay the checks of a PR.

I'd use the codespell workflow from Lombiq GitHub Actions, which runs the codespell CLI and is trivial to use. We introduced it to Orchard Core Commerce too: OrchardCMS/OrchardCore.Commerce#520.

Describe alternatives you've considered

Either not using spell-checking or using a more traditional one. However, based on our experiences at Lombiq, I'd advise against either.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions