Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install misspellings

How to install misspellings

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install misspellings
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
1.1 Available View build log
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
Windows (64-bit)
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
1.1 Available View build log
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
Mac OS X (10.5+)
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
1.1 Available View build log
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
Linux (32-bit)
1.3
2.0c Failed View build log
1.3 Available View build log
1.1 Available View build log
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
Linux (64-bit)
1.3
2.0c Failed View build log
1.3 Available View build log
1.1 Available View build log
1.3
2.0cNever BuiltWhy not?
1.3 Available View build log
2.0c Failed View build log
 
Author
License
GNU General Public License v3
Lastest release
version 2.0c on Feb 20th, 2013
Build status

Spell checker for code

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).

Example

To try it out, merely run the following (using an old coreutils source tree as an example):

$ git clone git://git.sv.gnu.org/coreutils -b v8.10 coreutils
$ find coreutils -name '*.c' | misspellings -f -
coreutils/src/cat.c:754: efficency -> "efficiency"
coreutils/src/comm.c:198: funtion -> "function"
coreutils/src/expr.c:21: seperate -> "separate"
coreutils/src/pr.c:1417: accomodate -> "accommodate"
coreutils/src/tac.c:342: unneccessary -> "unnecessary"
coreutils/src/test.c:91: supressed -> "suppressed"

Contributions

Contributions are welcome! Please add unit tests for new features or bug fixes. To run all the unit tests run ./setup.py test. If you have tox installed, just run tox.

You can review coverage of added tests by running coverage run setup.py test and then running coverage report -m.

Note that tests are run on Travis for all supported python versions whenever the tree on github is pushed to.

The code is available in the following locations:

Pull requests on any of those platforms or emailed patches are fine.

TODO

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. 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. 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.

Subscribe to package updates

Last updated Feb 20th, 2013

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.