-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AbstractSpellCheckCodeFixProvider depends on IDE completion options #58745
Comments
@CyrusNajmabadi What's the logic behind using completion items in spell checker? Should the spell checker use constant, non-configurable set of completion options rather then reading them from the solution options? |
Basically, the idea is: completion already is the reverse side of this process. It informs us as to what names we already think are valid in this location (through all of our completion logic systems). So if you misspell something, we can just use completion to guess as to what they may have meant instead.
I think a constant set of options is entirely fine. |
Sounds reasonable. |
We do have other code fix providers that depend on IDE options, e.g. Add Import. |
Code fixes are only executed in the IDE. Analyzers execute in both, but NuGet-installed analyzers are blocked from accessing the IDE definitions of options. |
Closing out as by design. |
The code fix provider reads CompletionOptions from Solution snapshot. These options are not configurable via .editorconfig, only in the IDE. Therefore this code fix provider will behave differently when executed from build vs IDE.
roslyn/src/Features/Core/Portable/SpellCheck/AbstractSpellCheckCodeFixProvider.cs
Lines 106 to 122 in f36574c
The text was updated successfully, but these errors were encountered: