Slashdot Mirror


Programmer's Language-Aware Spell Checker?

Jerry Asher writes "Not all of my coworkers are careful about spelling errors. Sometimes this causes real embarrassment as spelling errors creep into software interfaces. Does anyone know of spell checkers for programming languages? I don't want a text spell checker, I want a programming-language-aware spell checker. A spell checker that I can pass all of my code through and will flag spelling errors in function names, variable names, and comments, but will ignore language keywords, language constructs and expressions, and various programming styles (camel code, or underscores, or...). I want a spell checker that knows that void *functionSigniture(char *myRoutine) contains one spelling error. Does anyone have such a thing for Java or C++? Are there any Eclipse plugins that do this?"

6 of 452 comments (clear)

  1. Eclipse WTP 3.3 Europa seems to do this.. almost. by pringlis · · Score: 5, Informative

    The version of Eclipse I run, Eclipse WTP 3.3, does spell checking on comments as standard. Not for variable, function names and the like though. It's a decent first attempt though. In truth, I turned it off within the first few hours. It underlines any mistakes in red which I find really annoying when scanning code as I keep thinking I've seen syntax errors. More often than not my eyes are drawn to a spelling mistake, which in many cases isn't even really a mistake, which distracts me from what I'm actually trying to look at.

  2. Visual Assist by Anonymous Coward · · Score: 3, Informative

    Visual Assist for Visual Studio does this.

    Next silly question, please.

    1. Re:Visual Assist by lanthar · · Score: 3, Informative

      It is important to note that with a large code base, Visual Assist is noticing any time you have a variable or function name that it can't find anywhere else, and highlighting it with the red underline. This is in addition to turning the various keywords, macros, #defines, class names, function names, member variable names, nonmember variable names, and other such things all into their own colors. Granted, if you misspell something everywhere, then it will highlight correctly, and not indicate a problem. It's still a simple thing to notice it and bulk find/replace a string in all files in your project/solution/directory/etc. If you are a walking spellchecker like me, you'll be glad you've made your whole group install it. Also the extra droplists it provides, the wonderful shift insert droplist of previous copy/paste entries, and a variety of other great features will all make you happy to pay the tiny registration fee for each programmer on your team. I'd say it saves me at least 30 minutes of digging through our 2 million lines of code to remember how someone capitalized something or which spelling or abbreviation to use. -A very satisfied VA customer who recommends it to every VS programmer he knows

  3. Re:It's a good question ... by Corporate+Troll · · Score: 5, Informative

    As a non-native English speaker, working in a non-native english speaking team (mainly french speaking people) it is a real problem. The biggest problem happens when you search something and don't find it because you wrote it right and your coworker wrote it wrong. (Or the inverse, I don't claim to be perfect in English)

    Sure, you might say, "Write your code in French", but that's not a solution. My mother tongue is Dutch, we have a German coworker, and you never know if the next guy will be Italian. There is also this team that has to maintain code written by Spanish people.... in Spanish.... and they don't know Spanish. Fun times, if you like to hear them curse....

    In multilingual environments this problem increases drastically.

  4. FxCop by Koyaanisqatsi · · Score: 5, Informative

    For .net languages, FxCop does some of this checking, even understanding camel casing and underscores in tokens. And a bunch more, since it is a static code analysis tool.

    http://www.gotdotnet.com/Team/FxCop/

  5. Re:Man Dies Waiting for Eclipse to Launch by ravenlock · · Score: 5, Informative

    Credit where credit is due -- this is an excerpt from Stevey's Tech News, Issue #1.