-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fix delegate conversion on analyzers #1964
Conversation
Add tests
…rDelegateConversion
@@ -72,6 +72,12 @@ public override void Initialize (AnalysisContext context) | |||
CheckMethodOrCtorCall (operationContext, prop.SetMethod); | |||
}, OperationKind.PropertyReference); | |||
|
|||
context.RegisterOperationAction (operationContext => { |
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.
This diff makes me think we need to share more between the two analyzers. They look like they're doing pretty much exactly the stuff.
@@ -352,5 +352,52 @@ public void M() | |||
|
|||
return VerifyRequiresAssemblyFilesAnalyzer (src); | |||
} | |||
|
|||
[Fact] |
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.
Same with the tests. Can we start to share stuff here?
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.
I open #1986 to track the refactoring work in a separate PR since I think it would have a lot of feedback.
Fix test Add number of iterations to codefix
test/ILLink.RoslynAnalyzer.Tests/RequiresUnreferencedCodeAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
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 aside from small question about comment
Fix delegate conversion on analyzers Fix test in RequiresUnreferencedCodeAnalyzer Add tests for delegate conversion Add the ability to pass the number of iterations in a codefix Commit migrated from dotnet/linker@7ddfe7b
Fix delegate conversion on analyzers
Add tests
Related to #1912