-
Notifications
You must be signed in to change notification settings - Fork 5
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 Rosylyn analyzer for irrelevant APIs #717
Conversation
jpalac
commented
Sep 8, 2023
- Rebase of [SPIKE] Api usage analyzer spike #640
- Fixes Prevent the use of NSB configuration APIs that aren't applicable to serverless environments #651
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.
Looks solid to me. I added a few thoughts about the diagnostic messages (sorry for not making better suggestions right away).
src/NServiceBus.AzureFunctions.Analyzer.Tests/AnalyzerTestFixture.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsTransportAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsConfigurationAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsTransportAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsConfigurationAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsDiagnostics.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsDiagnostics.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsDiagnostics.cs
Outdated
Show resolved
Hide resolved
internal static readonly DiagnosticDescriptor MaxAutoLockRenewalDurationNotAllowed = new DiagnosticDescriptor( | ||
id: MaxAutoLockRenewalDurationNotAllowedId, | ||
title: "MaxAutoLockRenewalDuration is not supported in Azure Functions", | ||
messageFormat: "Azure Functions endpoints do not control the message receiver and cannot decide the lock renewal duration.", |
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.
should we refer to the trigger specific config option instead? https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus-trigger?tabs=python-v2%2Cin-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-csharp#peeklock-behavior
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsDiagnostics.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsConfigurationAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsConfigurationAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsSendReplyOptionsAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsTransportAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer.Tests/AzureFunctionsTransportAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsDiagnostics.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsDiagnostics.cs
Outdated
Show resolved
Hide resolved
src/NServiceBus.AzureFunctions.Analyzer/AzureFunctionsDiagnostics.cs
Outdated
Show resolved
Hide resolved
Thank you @timbussmann and @danielmarbach for taking the time to look over this PR. |