Grammar analysis
Grammar rules
ReSharper checks grammar against a set of rules defined for a language. For example, in English, there are rules on how to properly use articles, commas, and past tense forms, stylistic hints for creative and plain writing, common typos and words that are commonly confused, proper collocations, and many more.
Most of these rules are enabled by default and detect definite mistakes. However, some of them are suggestions that you may not agree with or not care about. In this case, you can disable a specific rule from the Alt+Enter menu or in the settings.
Configure the set of rules
Select from the main menu or press Alt+R O, then choose on the left.
On the Rules tab, expand the language node and select the rules against which you want to check your text.
Use the search field to filter the list of rules with a keyword, such as
articleorcomma.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.
Automatically fix simple issues
There are certain mistakes that are trivial enough to fix them automatically. For example, you can specify your preferred dash style and be sure that the IDE will convert any dash or hyphen you use to the proper one for you.
Select Automatically fix simple issues as you type (e.g., convert hyphens to dashes).
Exceptions
Exceptions are words and phrases that you want to be always considered correct. If some rule triggers a mistake in a phrase that you do not want to highlight, you do not need to disable this rule, because then it will not be triggered in other places where the rule is valid. In this case, you can add the phrase as an exception using the Alt+Enter menu.
Review all added exceptions
Select from the main menu or press Alt+R O, then choose on the left.
On the Exceptions tab, you can see the list of words and phrases added as exceptions. Remove an exception by selecting it and clicking Remove.
Configure grammar inspections
By default, grammar inspections are enabled for almost all contexts. You can enable/disable individual inspections and change their severity levels by searching for grammar on the page of ReSharper options .
If you have methods that are supposed to receive raw text with 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 .