-
Notifications
You must be signed in to change notification settings - Fork 510
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
Remove references from analyzers to Microsoft.CodeAnalysis.Workspaces #1674
Conversation
* Helper classes which depend on Microsoft.CodeAnalysis.Workspaces are located in the WorkspaceHelpers namespace. * Helper classes which do not depend on Microsoft.CodeAnalysis.Workspaces are located in other namespaces.
Current coverage is
|
👍 Changes look good to me. What a nasty kind of dependency problems. Do you think its worth to have some unit tests that will verify this kind of dependency? |
This change allows us to ensure analyzers never contain references to Microsoft.CodeAnalysis.Workspaces.
Now that two assemblies are used, separation of the namespaces is no longer required.
@vweijsters I took a more extreme approach with the two commits I just added. With two assemblies, it is now impossible for our analyzers to reference types that would cause this problem. |
👍 |
Remove references from analyzers to Microsoft.CodeAnalysis.Workspaces
Analyzers are not allowed to directly or indirectly reference the Microsoft.CodeAnalysis.Workspaces assembly. This means analyzers cannot reference members of code fix providers.
TokenSpacingCodeFixProvider
inside of various analyzers.