Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch source-code aware spell check

What is a tool or technique that can be used to perform spell checks upon a whole source code base and its associated resource files?

The spell check should be source code aware meaning that it would stick to checking string literals in the code and not the code itself. Bonus points if the spell checker understands common resource file formats, for example text files containing name-value pairs (only check the values). Super-bonus points if you can tell it which parts of an XML DTD or Schema should be checked and which should be ignored.

Many IDEs can do this for the file you are currently working with. The difference in what I am looking for is something that can operate upon a whole source code base at once.

Something like a Findbugs or PMD type tool for mis-spellings would be ideal.

like image 929
shadit Avatar asked Sep 18 '08 18:09

shadit


People also ask

How do you markdown a spell check?

R Markdown Cookbook If you use the RStudio IDE, you can press the F7 key or click the menu Edit -> Check Spelling to spell-check an Rmd document.

Is there a spell check in Visual Studio?

The Visual Studio 2022 editor will have a built-in spell-checker to help you code more accurately with fewer errors.

What is the spell check tool?

Spell check is a software program that corrects spelling errors in word processing, email and online discussions. Spell check identifies and corrects misspelled words. It also allows you to search a document yourself for words you know you've misspelled.


2 Answers

As you mentioned, many IDEs have this functionality already, and one such IDE is Eclipse. However, unlike many other IDEs Eclipse is:

A) open source

B) designed to be programmable

For instance, here's an article on using Eclipse's code formatting functionality from the command line: http://www.peterfriese.de/formatting-your-code-using-the-eclipse-code-formatter/

In theory, you should be able to do something similar with it's spell-checking mechanism. I know this isn't exactly what you're looking for, and if there is a program for doing spell-checking in code then obviously that'd be better, but if not then Eclipse may be the next best thing.

like image 177
machineghost Avatar answered Oct 01 '22 03:10

machineghost


This seems little old but seems to do a good job Source Code Spell Checker

like image 30
Chathuranga Wijeratna Avatar answered Oct 01 '22 03:10

Chathuranga Wijeratna