A tool to detect misspellings with opinionated additions
Project description
# misspelling
## Spell checker for code
> This is a project originally forked from https://github.com/erichurkman/misspellings
This is a Python library and tool to check for misspelled words in source code. It does this by looking for words from a list of common misspellings. The dictionary it uses to do this is based on the Wikipedia list of common misspellings.
The list has been slightly modified to remove some changes that cause a number of false positives. In particular ok->OK was removed (ok is frequently used in perl tests for instance).
## Opinionated version
This includes custom additions that should be considered opinionated, such as cancellation vs. cancelation. This is not recommended for anyone’s use.
## Contributions
Contributions are welcome! Please add unit tests for new features or bug fixes. To run all the unit tests run pytest tests/.
You can review coverage of added tests by running pytest –cov=tests.
Note that tests are run on GitHub Actions for all supported python versions whenever the tree on GitHub is pushed to.
The packaged version is available via pip or easy_install as misspellings-lib. The project page is on pypi:
The source code is available in the following locations:
code.google: http://code.google.com/p/misspell-check/
Gitorious: https://gitorious.org/uu/misspell-check
Sourceforge: https://sourceforge.net/p/misspell-check
Mazulo’s GitHub: https://github.com/mazulo/misspelling
Pull requests on any of those platforms or emailed patches are fine.
## To do
Some items on the TODO list:
Implement option to interactively fix files.
Give some thought to supporting multiple languages?
Might a “common misspellings” list be different for different English users - might an American make one set of mistakes while a German writing English make another? Source of this data?
Fix sed flag. We need to have it support sed -i optionally, have it output all unambiguous sed commands, have it be more careful on what it replaces. It might also be an idea to have a perl output option.
Use generators to allow finding errors as you go. However, currently misspellings grabs all files first, then checks them, which can take a while.
Lacking tests for misspellings cli.
## Credits
Kevin Lyda: Initial shell goo and python version.
Steven Myint: Better python idioms and style. Mixed case support. Travis/tox support.
Maciej Blizinski: Potential use in OpenCSW pushed move to python.
Ville Skyttä: Sped up wordification, editor-friendly reporting.
coverage: https://pypi.python.org/pypi/coverage
Kevin Lyda: https://github.com/lyda
Steven Myint: https://github.com/myint
Maciej Blizinski: https://github.com/automatthias
Ville Skyttä: https://github.com/scop
OpenCSW: http://www.opencsw.org/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file misspellings_lib-1.0.7.tar.gz
.
File metadata
- Download URL: misspellings_lib-1.0.7.tar.gz
- Upload date:
- Size: 54.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b03eef12b90dfb1b435def2222c39902c9434b412591dbe17c550245241f36e1 |
|
MD5 | 6beccaecf3f73fc04fb237cd10227f2e |
|
BLAKE2b-256 | 76b18a0f355914384debbd35ecccff0aada137a77b61cdef9aaaceb954dbab6c |
File details
Details for the file misspellings_lib-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: misspellings_lib-1.0.7-py3-none-any.whl
- Upload date:
- Size: 49.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 006f4863196e24371148cf54dd7981f8bdd011a5db927c0bd6c07edec0eeafdc |
|
MD5 | 3879ddd307972f6f628c1aa9b9fc255f |
|
BLAKE2b-256 | 104bc1b6ba8c1ae0fa90a9c577d0e3bb67e3ef28e615c89b343bc73c4feaa88e |