Skip to content
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

Merged
merged 5 commits into from
Oct 23, 2015

Conversation

sharwell
Copy link
Member

Analyzers are not allowed to directly or indirectly reference the Microsoft.CodeAnalysis.Workspaces assembly. This means analyzers cannot reference members of code fix providers.

* 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.
@sharwell sharwell added this to the 1.0.0 Beta 15 milestone Oct 23, 2015
@codecov-io
Copy link

Current coverage is 79.19%

Merging #1674 into master will increase coverage by +0.04% as of 9248870

@@            master   #1674   diff @@
======================================
  Files          539     541     +2
  Stmts        31799   31796     -3
  Branches      8928    8927     -1
  Methods                          
======================================
+ Hit          25169   25182    +13
  Partial       5184    5184       
+ Missed        1446    1430    -16

Review entire Coverage Diff as of 9248870

Powered by Codecov. Updated on successful CI builds.

@vweijsters
Copy link
Contributor

👍 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.
@sharwell
Copy link
Member Author

@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.

@vweijsters
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Violations of SA1113 are not reported in the MSBuild output
3 participants