sln file (for a C# project) or in the root directory (for a C++ directory). In this example, the first time the spell checker is run against any file in the solution, Visual Studio will check for an exclusion.dic file in the same directory as the. The exclusion dictionary is a simple text file that can be checked into source control where each line in the file contains a single word that should be considered a properly spelled word. This allows you to create your own exclusion dictionary to specify words you consider to be correctly spelled.Spelling_exclusion_path = absolute OR relative path to exclusion dictionary. In this example, spelling errors will be displayed as errors. This controls the severity Visual Studio will assign to spelling errors in the error list.Spelling_error_severity = error OR warning OR information OR hint (Example: = error) In this example, Visual Studio would check identifiers and comments for misspelled words but wouldn’t check inside strings. This controls what Visual Studio should check.Spelling_checkable_types = strings,identifiers,comments (Example: = identifiers,comments) Note that the fr-fr language pack must be installed on the user’s machine or Visual Studio will incorrectly flag any French words as spelling errors. In this example, Visual Studio would only use the en-us and fr-fr dictionaries when checking for spelling issues. This lists the languages for Visual Studio to use. Spelling_languages = _language_ (Example: = en-us,fr-fr) For your convenience, here’s the full list of available options: We added the spelling_use_default_exclusion_dictionary switch for editorconfig in this update. For instance “ misc.” will no longer be recommended as it could cause code that won’t compile. Recommendations that include punctuation will no longer be recommended.For instance “ \nhello” will no longer be flagged as a spelling error since the ‘ n’ is omitted and ‘ hello’ is a correctly spelled word. Backslashes will omit the subsequent character from spell-checking.Strings that contain URLs (E.g., “ or ” mailto.”.) will not be spell checked over the entire string.We added additional improvements for some special cases based on this feedback: We also appreciate the folks who caught some cases we didn’t think of. UTF-16 encoding is no longer necessary, so users should be able to modify exclusion dictionaries without running into encoding issues. With this update, we’ve improved the way Visual Studio works with exclusion files. We got multiple reports of the encoding becoming corrupted, particularly when users manually modified these files to remove excluded words. In either case, the spell-checking APIs required the exclusion file to have “UTF-16 with BOM” encoding to work correctly. Visual Studio will use the exclusion dictionary specified by the spelling_exclusion_path switch in your editorconfig file or an “exclusion.dic” file in your %localappdata%\Microsoft\VisualStudio\ directory if a switch can’t be found. Exclusion Dictionary EncodingĪnother issue many folks ran into was around the encoding of the exclusion dictionaries used by the spell checker. Later in this post, we’ll discuss the switch we’ve added to editorconfig that can control this behavior, should users want to disable it. This should significantly reduce the number of false positives, especially when commenting out pieces of code. In this update, we’ve partnered with the C++ and C# teams to add exclusion dictionaries specific to those languages that detect words are commonly used in those languages. Words like ‘guid’ or ‘args’ are commonly found in code documents but were getting flagged as misspelled words by the spell checker. We added heuristics to compensate for how code uses those words, so constructs like HelloWorld would be properly spell checked, but developers use many words that aren’t part of our spoken languages. The spell checker uses the same dictionaries as the spoken languages that were detected. The biggest feedback we heard was concerning false positives. Otherwise, let’s dive into the exciting enhancements in Visual Studio 17.6 preview 2! Programming Language Specific Dictionaries If you’re new to the spell checker feature, check out our earlier blog post for an introduction. We’ve received an overwhelming amount of valuable feedback from developers like you, which has helped shape and refine this feature before its release to the release channel. Welcome to our latest blog post about the spell checker feature in Visual Studio 17.6 preview 2! We’re excited to share with you the latest improvements we’ve made to this feature, which was first introduced in the Visual Studio 17.5 preview releases for C#, C++, and markdown files.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |