Skip to main content

Spell Checker

  • 3 minutes to read

The Spell Checker finds misspelled words in identifiers, strings, file names and code comments, and shows correction options in the Code Actions menu. This component checks through:

  • the entire solution when you open it;
  • all newly entered text.

How to Enable

Use one of the following methods to enable the Spell Checker:

  1. The Quick Setup options section.

    Quick Setup Spell Checker

  2. The Editor | All Languages | Code Analysis | Spell Checker options page.

    Spell

  3. The CodeRush Visualize toolbar button (SpellChecker_Toolbar)

Note

Make sure that the option “Run code analysis in a separate process“ in the Tools → Options → Text Editor → C# → Advanced option page is turned off:

Visua Studio option - Run code analysis in separate process

This enables the spell checker to display both a squiggly line under misspelled words and the Spell Checker context menu.

Spell Check Diagnostics

Each Spell Checker Setting matches the corresponding diagnostic ID. This allows you to filter misspelled words by context in the spell check results.

The following table shows IDs for each of these diagnostics:

ID Title
CRRSP02 A repeated word has been found.
CRRSP03 A misspelled word has been found in the file name.
CRRSP04 A misspelled word has been found in the XML documentation comment.
CRRSP05 A misspelled word has been found in the comment.
CRRSP06 A misspelled word has been found in the string.
CRRSP07 A misspelled word has been found in the verbatim string.
CRRSP08 A misspelled word has been found in the public identifier.
CRRSP09 A misspelled word has been found in the internal identifier.
CRRSP10 A misspelled word has been found in the protected internal identifier.
CRRSP11 A misspelled word has been found in the protected identifier.
CRRSP12 A misspelled word has been found in the private identifier.
CRRSP13 A misspelled word has been found in the local identifier.

You can use the Code Issues window to find misspelled words in your code.

SpellCheck

How to Review and Apply Spell Checker Suggestions

  1. Place the caret in a misspelled word.
  2. Use the Ctrl+. or Ctrl+~ shortcut to invoke the Code Actions Menu.
  3. Select the desired item from the Spell Checker sub menu.

    SpellCheck

    Note

    The Spell Checker checks public, protected, protected internal, and internal members. Use the Editor | All Languages | Code Analysis | Spell Checker options page to change this default behavior.

How to Add a Word to the Custom Dictionary

If CodeRush does not recognize a word, you can add it to the custom dictionary implementing the steps listed below.

  1. Place the caret in a word you want to add to the dictionary.
  2. Open the Code Actions Menu and choose the Spell Checker -> Add to dictionary: ‘new word’ item.

    SpellCheck

How to Configure Spell Checker Options

Open the Editor | All Languages | Code Analysis | Spell Checker options page to access the Spell Checker Options.

The screenshot below shows default Spell Checker settings.

Options

Change the Spell Checker Language

CodeRush includes a built-in dictionary for the English language. To enable spell-checking capabilities for other languages, add a dictionary to the Spell Checker. See the following example for details: How to: Add a Dictionary to the Spell Checker.