Grammar and spelling analysis
One important task of code inspection is the analysis of grammar and spelling in natural languages. ReSharper will look for spelling and grammar errors in identifiers, comments, and string literals. When it detects a potential error or a typo, it will let you know in the same way as for other code issues — in design time or when you run code inspection in specific scope.
In this section:
Configure languages
By default, ReSharper checks spelling and grammar using the 'English (USA)' dictionary, but you can install dictionaries for other languages.
Install spelling and grammar dictionary
Select Alt+R O, then choose on the left.
from the main menu or pressClick Add.
In the dialog that opens, select one or more languages and click Install.
The selected dictionaries will be downloaded and installed.
Click Save in the Options dialog to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer by choosing this layer from the Save To selector. For more information, see manage and share resharper settings.
Configure spelling and grammar inspections
By default, spelling and grammar inspections are enabled for almost all contexts. You can enable/disable individual inspections and change their severity levels by searching for typo
and grammar
on the page of ReSharper options Alt+R, O.
If you have methods that are supposed to receive raw text with spelling and grammar errors, you can mark the corresponding parameters with the [IgnoreSpellingAndGrammarErrors] from JetBrains.Annotations. This will disable warnings for callers of the method.
You can disable grammar and spelling analysis by clearing the Grammar and Spelling checkbox on the page of ReSharper options Alt+R, O.
This feature is supported in the following languages and technologies:
The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the ReSharper by language section.