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

chore: add spell check #2953

Merged
merged 35 commits into from
Jul 30, 2024
Merged

chore: add spell check #2953

merged 35 commits into from
Jul 30, 2024

Conversation

erika-wallace
Copy link
Contributor

@erika-wallace erika-wallace commented Jul 26, 2024

Description

Work Item

This pull request adds a job to the Tests workflow and a Git pre-commit hook to the CLI repository, both dedicated to spell checking modified files. The spell checker will generate a list of any misspelled words it detects, including the file and line number. Also, there's a custom-dictionary.txt file that should be updated with words, variables, package names, etc. that are flagged by the spell checker but are not actually misspelled.

The spell-check job in the Tests workflow will fail if any spelling errors are detected, and the Git pre-commit hook will block the commit. To bypass the Git pre-commit hook and commit changes without running the spell check, use the -n flag.

Testing

  1. create a new branch based on this branch
  2. run yarn
  3. create a test file and add misspellings within it
  4. attempt to commit your changes
    NOTE: There should be a Git error when you try to commit, that's the expected behavior of the Git pre-commit hook due to the misspellings.
  5. run git commit with the -n flag and push changes to the branch
    NOTE: This will bypass the Git pre-commit hook and initiate the Tests workflow, which should also fail as expected.
  6. correct the misspellings in the test file
  7. commit and push to the branch (without the -n flag)
    NOTE: At this point, the commit should go through and the Tests workflow should pass.

@erika-wallace erika-wallace marked this pull request as ready for review July 29, 2024 20:57
@erika-wallace erika-wallace requested a review from a team as a code owner July 29, 2024 20:57
Copy link
Contributor

@zwhitfield3 zwhitfield3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is well structured with a clean implementation. The testing instructions were clear and easy to follow. This is fantastic work @erika-wallace! Can't wait to see this new CI check in action!

@erika-wallace erika-wallace merged commit 7ff333a into main Jul 30, 2024
8 checks passed
@erika-wallace erika-wallace deleted the ew/spell-check-action branch July 30, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants