How to disable the typo in comment by resharper

Viewed 11512

For Resharper can't support Chinese well that all of my comment will be suggest changed.

enter image description here

But I don't think I need to do it.

Questions 1: how to disable the typo in the comment by Resharper?

Questions 2: where can I find the Chinese dictionary? I find wooorm/dictionaries but I can't find the Chinese dictionary.

5 Answers

Resharper 2018.2.1 bring the ReSpeller that just like with code analysis, ReSpeller scans for spelling mistakes and typos in identifiers, comments, string literals and more, and provides quick-fixes to resolve the problem.

To disable the typo in the comment by Resharper, you should click the Resharper and enter option.

You should select the Code Inspection->inspection severity and then you should type typo to search see this image.

enter image description here

You can toggle the Typo in comment to open or close it.

And the other way is to disable ReSpeller.

You should select ReSpeller and then you should uncheck it.

enter image description here

See Spell Checking with ReSpeller

Integrated spell checking with ReSpeller in ReSharper and Rider

hunspell/hunspell: The most popular spellchecking library.

Disable the typo by ReSharper

  • ReSharper → Options
  • Code Inspection → Inspection Severity
  • Search: Typo
  • Disable whatever you want

If you want to disable those once per class/interface, you can use the SuppressMessage Attribute (where CommentTypo is the inspection you asked for) like so:

    [SuppressMessage("ReSharper", "InconsistentNaming")]
    [SuppressMessage("ReSharper", "IdentifierTypo")]
    [SuppressMessage("ReSharper", "CommentTypo")]
    public interface IHaveNoControlOverTheirApi
    {
        //...
    }

You can also suppress code inspections in other scopes if you like.

Have a look at ReSharper's documentation on code inspections to see what kinds of inspections can be disabled.

For your question 1:

Maybe what you need is to turn off non-English spell checking only, not turn off all the comments spell checking. Unfortunately, ReSharper doesn't provide such an option to turn off only non-English spell checking.

I've reported this issue to its official document and you can see the discussions here: https://www.jetbrains.com/help/resharper/Spell_Checking.html

ReSharper has an issue to trace this problem: ReSpeller: Ignore Chinese and Japanese: RSPL-6949. So you can just wait for this improvement in the next bugfix.

For your question 2:

I can't find any Chinese dictionaries for spell checking.

Related