-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/precommit codespell #137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my order was misleading.
pre-commit aim to ensure pushed files have no typo. (for the future)
but currently there already are typos, so pls fix them in this PR using codespell, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls fix these problems, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
New pre-commit spell checker function.
Developer description: "Fix common misspellings in text files. It's designed primarily for checking misspelled words in source code (backslash escapes are skipped), but it can be used with other files as well. It does not check for word membership in a complete dictionary, but instead looks for a set of common misspellings. Therefore it should catch errors like "adn", but it will not catch "adnasdfasdf". This also means it shouldn't generate false-positives when you use a niche term it doesn't know about."
https://github.com/codespell-project/codespell
Implementation:
Checks new git commits for spelling errors. User cannot submit if there are errors.
Ignored directories: frontend/build frontend/node_modules
Ignored files: *.lock, *.log, *.egg-info
Additional ignored words stored in: .codespellignore
Please add words to .codespellignore if they are incorrectly flagged in your code