VSSpellChecker icon indicating copy to clipboard operation
VSSpellChecker copied to clipboard

The code analyzer cannot add words to ignored words files or user dictionaries

Open EWSoftware opened this issue 1 year ago • 4 comments

There don't seem to be any provisions for modifying files outside of the containing project of the file on which the code analyzer is running. While it may be possible to add support for ignored words files within the project using the Additional File Items feature, this is rather cumbersome as the ignored words file would have to be added to every project in the solution. Not a problem if there's only one or two but a real issue for large solutions with a large number of projects. The preferred approach is to put the ignored words file in Solution Items but it doesn't seem to be accessible there. Likewise, there don't appear to be any provisions for modifying files outside of the project system (an ignored words file in the global configuration and user dictionary files).

If anybody knows more about how this could be made to work, I would appreciate the help as I haven't been able to figure out a solution.

EWSoftware avatar May 08 '23 19:05 EWSoftware

Is this the reason that there is currently no convenient way for adding words to the ignore list? From what I noticed you need to manually add the words you want to ignore to the spell checker settings...

djurodrljaca avatar May 13 '23 13:05 djurodrljaca

For identifier misspellings, yes. For strings and comments, it's done using the tagger so works as it always has.

EWSoftware avatar May 13 '23 18:05 EWSoftware

To rehash an already closed item, is losing the ability to add\ignore words in the source code worth the balance of having the errors show up in code analysis?

My question: Is it possible for me to disable the code analyzer stuff in my .editorconfig, and have it spell check the code in the same fashion it does with comments in the same files? That way my team can have a consistent user experience with spell checking comments vs code, and not have to do two different things.

Thanks!

robertson-bauercontrols avatar Jul 27 '23 18:07 robertson-bauercontrols

Turn off the code analyzer option in the general settings category. You can do it in the global configuration or by an .editorconfig in a specific solution or project.

EWSoftware avatar Jul 27 '23 20:07 EWSoftware