-
Notifications
You must be signed in to change notification settings - Fork 184
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
Analyzer for Multiple-Output Binding Scenarios with ASP.NET Core Integration #2706
base: main
Are you sure you want to change the base?
Conversation
...ons/Worker.Extensions.Http.AspNetCore.Analyzers/src/CodeFixForHttpResultAttributeExpected.cs
Show resolved
Hide resolved
...sions/Worker.Extensions.Http.AspNetCore.Analyzers/src/HttpResultAttributeExpectedAnalyzer.cs
Outdated
Show resolved
Hide resolved
test/extensions/Worker.Extensions.Http.AspNetCore.Tests/HttpResultAttributeExpectedTests.cs
Outdated
Show resolved
Hide resolved
Can you include a screenshot/gif in the PR desc of this analyzer working? |
extensions/Worker.Extensions.Http.AspNetCore.Analyzers/src/DiagnosticDescriptors.cs
Outdated
Show resolved
Hide resolved
...sions/Worker.Extensions.Http.AspNetCore.Analyzers/src/HttpResultAttributeExpectedAnalyzer.cs
Outdated
Show resolved
Hide resolved
...ons/Worker.Extensions.Http.AspNetCore.Analyzers/src/CodeFixForHttpResultAttributeExpected.cs
Outdated
Show resolved
Hide resolved
...ons/Worker.Extensions.Http.AspNetCore.Analyzers/src/CodeFixForHttpResultAttributeExpected.cs
Outdated
Show resolved
Hide resolved
...ons/Worker.Extensions.Http.AspNetCore.Analyzers/src/CodeFixForHttpResultAttributeExpected.cs
Outdated
Show resolved
Hide resolved
...ons/Worker.Extensions.Http.AspNetCore.Analyzers/src/CodeFixForHttpResultAttributeExpected.cs
Show resolved
Hide resolved
...ons/Worker.Extensions.Http.AspNetCore.Analyzers/src/CodeFixForHttpResultAttributeExpected.cs
Outdated
Show resolved
Hide resolved
extensions/Worker.Extensions.Http.AspNetCore.Analyzers/src/DiagnosticDescriptors.cs
Outdated
Show resolved
Hide resolved
namespace Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore | ||
{ | ||
internal static class ITypeSymbolExtensions | ||
{ |
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.
Does this method need to take into account interfaces at all?
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.
Given that OutputBindingAttribute
is not an interface, this will successfully find classes that implement the abstract class.
For classes that implement some interface, this should just exit (BaseType
returns null
).
|
||
namespace Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore | ||
{ | ||
internal static class ITypeSymbolExtensions |
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.
please create a unit test for this this file and test the IsOrDerivedFrom
method (should be done for all helper methods/extensions)
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.
Leaving this for another iteration - need to investigate how to best test this as we may need access to a compilation and semantic model.
Issue describing the changes in this PR
resolves #2352
Pull request checklist
release_notes.md
Additional Information
Screenshots of the alert and code-fix.