EWSoftware / VSSpellChecker

A Visual Studio spell checker editor extension that checks the spelling of comments, strings, and plain text as you type. Supports configuration and various languages.
Other
377 stars 65 forks source link

C# 11 Raw String Literals Excluded From Spellcheck #265

Closed kkm000 closed 1 year ago

kkm000 commented 1 year ago

Configuration

Issue

C# 11 has introduced a new syntax for multiline strings, see Raw String Literals. VSSpellChecker does not spell-check these, neither on-the-fly in the editor (VSSpellCheckEverywhere), nor using the spell-check tool window (VSSpellChecker).

Reproduction

  1. Install Studio 2022 Version 17.4.0 RC4 for Windows. The shorter RC download buttons are directly above the linked subheading and below the taller release version buttons, scroll up just a bit. The page is confusing. There is an option to install it SxS with an existing installation if so preferred. Make sure that .NET 7 option is selected during install, this adds C# 11 support. Install VSSpellChecker extension.
  2. Create a new C# project, select "NET 7" target in its properties, and paste the following to the Program.cs file:
    string rawString = """
     Files gerenated in the ouput diectory are deteted on abrot
     to preverse conistency of the daraset on mutliple runs.
     """;
    string regularString = "Files gerenated in the ouput diectory are deteted on abrot.";
  3. Observe that spelling errors are undersquiggled in the regularString but not in rawString:

    image

EWSoftware commented 1 year ago

I'll take a look at it when it's generally available. Unfortunately, I don't have time to install and test with each of the previews and release candidates.