The code critics tool of the Refactoring Browser points out all kinds of code smells. However, correct spelling of entities in source code is an often neglected smell and remains unchecked by the traditional rules.
As an example take the current development version of Seaside. In my development image there are 8757 methods. In total these methods declare 1403 temporary variables. 84 variables are marked because of suspicious spelling. About a quarter of these variables are actually spelled wrong.
I published a new extension to code critics. Load the latest versions of Refactoring-Core
and Refactoring-Spelling
from the repository on SqueakSource. Use the OmniBrowser integration to run the checks. If you run on OS X, the spell checker of the system is used thanks to the excellent plugin of John McIntosh. On other platforms, a weaker built-in spell checker is used. The checks work at the level of AST nodes and individually check the following code elements:
- class names
- class comments
- class categories
- instance variable names
- class variable names
- pool variable names
- method protocols
- method selectors
- method comments
- literal values
- argument variable names
- temporary variable names
Given that the spell checker is not integrated with Pier yet, it is up to you to find the spelling errors in this post.
Comments
Very nice!
This is cool :)