Skip to content
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

Add codespell action and workflow for spell-checking (OSOE-960) #423

Closed
7 tasks done
Piedone opened this issue Jan 9, 2025 · 1 comment · Fixed by #426
Closed
7 tasks done

Add codespell action and workflow for spell-checking (OSOE-960) #423

Piedone opened this issue Jan 9, 2025 · 1 comment · Fixed by #426
Assignees
Labels
enhancement New feature or request

Comments

@Piedone
Copy link
Member

Piedone commented Jan 9, 2025

Add an action and a reusable workflow to do spell-checking with codespell.

Codespell works by looking for misspellings (like these) instead of matching every word to a dictionary. While this is surely a less safe approach if the ultimate goal is to prevent spelling mistakes, it also looks like one that would basically eliminate false positives. This is a better deal than having frequent annoying false positives, even if this means that a few misspellings may slip through.

We could use the codespell GHA action, what installs codespell and runs it. However, this is only a quite thin wrapper on the codespell executable, doesn't use the latest version of it, and doesn't expose all config options (like codespell-project/actions-codespell#19 and codespell-project/actions-codespell#63) that we might need. So, perhaps just use it from PIP by doing something like this.

  • Add an action and a reusable workflow. The action should run codespell from the CLI.
  • The action should contain a default configuration suitable for most of our projects, with options to override what's necessary. Using a custom config file in the consumer repo should be possible.
  • It should be possible to exclude any number of complete files and folders, also by patterns (so we don't check all OSOCE submodules in other superprojects).
  • Display a hint/message on failing spell-checking with information about where to find documentation, and how to ignore single false positives inline.
  • Add Markdown documentation.
  • Add a job to the Build and Test workflow of OSOCE, like there is Spelling now, that we'll run in parallel as a test for now.
  • Contrast the number of false positives of check-spelling and codespell. How many inline ignores and dictionary entries? Also in the other projects.

Jira issue

@Piedone Piedone added the enhancement New feature or request label Jan 9, 2025
@github-actions github-actions bot changed the title Add codespell action and workflow for spell-checking Add codespell action and workflow for spell-checking (OSOE-960) Jan 9, 2025
@Piedone
Copy link
Member Author

Piedone commented Jan 12, 2025

In OSOCE, check-spelling produces 112 false positives, while codespell 10. In LGHA (including the common defaults), this is 242 vw 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant