-
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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() | ||
{ | ||
SetUpEditor(@" | ||
using System; | ||
|
||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
int x = 2; | ||
x = 5;$$ | ||
} | ||
} | ||
"); | ||
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 commentThe 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 commentThe 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 commentThe 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. |
||
} | ||
|
||
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsAddImport)] | ||
public void FastDoubleInvoke() | ||
{ | ||
|
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.