-
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
Add MS.CA.CSharp.Workspaces and MS.CA.VB.Workspaces as VSIX analyzer … #57294
Conversation
…assets Fixes dotnet#57293 With recent changes to move OOP to .NET Core, we seem to require specifying analyzer dependencies as analyzer assets. dotnet@6c7f97b added MS.CA.Workspaces as an asset, this change extends it to add the C# and VB Workspaces assemblies as analyzer assets.
Tagging @jinujoseph @vatsalyaagrawal for visibility NOTE: Without this change, all our IDE analyzers that reference CSharpCodeStyleOptions or VisualBasicCodeStyleOptions in their constructor will fail to load, we have large number of such analyzers in our codebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@genlu Will probably need your help here, seeing the following build time failure in integration test runs:
|
Thank you @JoeRobich |
} | ||
"); | ||
VisualStudio.Editor.InvokeCodeActionList(); | ||
VisualStudio.Editor.Verify.CodeAction("Unnecessary assignment of a value to 'x'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akhera99 Thanks for adding the test. Shouldn't the code action string here be 'Remove redundant assignment'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sorry, it was late
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akhera99 You may need to fix the added integration test with a separate test-only PR.
@@ -84,6 +84,26 @@ class Program | |||
VisualStudio.Editor.Verify.CodeAction("using System;"); | |||
} | |||
|
|||
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedValues)] | |||
[WorkItem(57293, "https://github.com/dotnet/roslyn/issues/57293")] | |||
public void RemoveRedundantAssignmentCodeFix() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to point out that this change is required at the moment to cover Core host sceanrios.
…assets
Fixes #57293
With recent changes to move OOP to .NET Core, we seem to require specifying analyzer dependencies as analyzer assets. 6c7f97b added MS.CA.Workspaces as an asset, this change extends it to add the C# and VB Workspaces assemblies as analyzer assets. These assemblies define CSharpCodeStyleOptions and VisualBasicCodeStyleOptions types, which are used in ctors of many of our analyzers.