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 automatic spell checking to TriBITS #571

Closed
1 of 2 tasks
bartlettroscoe opened this issue Mar 29, 2023 · 7 comments
Closed
1 of 2 tasks

Add automatic spell checking to TriBITS #571

bartlettroscoe opened this issue Mar 29, 2023 · 7 comments
Assignees
Labels
component: testing Dealing with automated testing not specific to any other component type: enhancement

Comments

@bartlettroscoe
Copy link
Member

bartlettroscoe commented Mar 29, 2023

Description

I has been brought up several times that there are spelling errors in TriBITS documentation and source code. Examples include #404 and comments in may PRs (e.g. #560 (comment)). I try to remember to turn on flyspell in Emacs when editing files but I don't always remember to do it.

Possible Solutions

The best long-term solution would be to add support to TriBITS to run spell checking (with managed ignores) as part of local and GitHub Actions tests. That way, problems would be caught early and PR could not be merged until the spelling errors (the more known words are added) are addressed.

Tasks

@bartlettroscoe
Copy link
Member Author

@KyleFromKitware, based on your comment #560 (comment), I have assigned this Issue to you. Please put it in progress and add a comment if you start working on this and let's have a short conversation over MS Teams about this.

@bartlettroscoe
Copy link
Member Author

FYI: I was able to install codespell on my SNL RHEL 8 machine with:

sudo pip3 install codespell

But it is showing more spelling errors. I will fix those.

@KyleFromKitware
Copy link
Collaborator

This brings up a good point: we should make sure that CI is running the same version of codespell that you use locally. Perhaps we should use the PIP version in CI.

@bartlettroscoe
Copy link
Member Author

This brings up a good point: we should make sure that CI is running the same version of codespell that you use locally. Perhaps we should use the PIP version in CI.

That is a good idea.

I will commit and push my changes to this branch to make codespell pass on this TriBITS repo branch in the meantime. Then we can merge and deploy this PR :-)

bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
…BITSPub#571)

While running codespell 2.2.1, it flagged 'nDoes' in:

  #print("\nDoes ...")

which is not a mispelling (and a later version of codespell does not flag
this) but I wanted to remove it since it was not really being used.

And while I was at it, I remove all of the commented out print() statements
(since those were just there for debugging).
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
These really should be deleted since we don't maintain bare clones anymore,
and if we did, we could not care about these hooks.

I did this as part of TriBITSPub#571.
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
I also added a bash script to automate installing the git hook scripts with
printed messages.
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
…BITSPub#571)

While running codespell 2.2.1, it flagged 'n{nothing}Does' in:

  #print("\n{nothing}Does ...")

which is not a misspelling (and a later version of codespell does not flag
this) but I wanted to remove it since it was not really being used.

And while I was at it, I remove all of the commented out print() statements
(since those were just there for debugging).
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
These really should be deleted since we don't maintain bare clones anymore,
and if we did, we could not care about these hooks.

I did this as part of TriBITSPub#571.
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
I also added a bash script to automate installing the git hook scripts with
printed messages.
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
…BITSPub#571)

While running codespell 2.2.1, it flagged 'n{nothing}Does' in:

  #print("\n{nothing}Does ...")

which is not a misspelling (and a later version of codespell does not flag
this) but I wanted to remove it since it was not really being used.

And while I was at it, I remove all of the commented out print() statements
(since those were just there for debugging).
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
These really should be deleted since we don't maintain bare clones anymore,
and if we did, we could not care about these hooks.

I did this as part of TriBITSPub#571.
bartlettroscoe added a commit to KyleFromKitware/TriBITS that referenced this issue Mar 30, 2023
I also added a bash script to automate installing the git hook scripts with
printed messages.
@bartlettroscoe
Copy link
Member Author

With the merge of PR #573, this is complete.

@bartlettroscoe
Copy link
Member Author

This brings up a good point: we should make sure that CI is running the same version of codespell that you use locally. Perhaps we should use the PIP version in CI.

As shown here it looks like GHA is currently installing codespell version 2.1.0-1 while pip installed version 2.2.1 on my machine (and the newer version caught more possible misspelled words that I had to account for in a9fe9b7)

@bartlettroscoe
Copy link
Member Author

Let's just call this done. Having different versions of codespell has not been a big problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: testing Dealing with automated testing not specific to any other component type: enhancement
Projects
Status: Done
Development

No branches or pull requests

2 participants