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
Visual Studio 2022 v. 17.4.0 RC4 for Windows (rumors are it will have released on 11/03).
VSSpellChecker installed from inside VS, v. 2022.9.6.0, the latest available from the marketplace.
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
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.
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.";
Observe that spelling errors are undersquiggled in the regularString but not in rawString:
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.
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
Observe that spelling errors are undersquiggled in the
regularString
but not inrawString
: