-
Notifications
You must be signed in to change notification settings - Fork 231
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 S6966 FP: EntityFrameworks DbContext/DBSet Add/AddRange methods are preferred over their Async counterpart #9318
Conversation
@@ -27,6 +27,7 @@ public sealed class UseAwaitableMethod : SonarDiagnosticAnalyzer | |||
{ | |||
private const string DiagnosticId = "S6966"; | |||
private const string MessageFormat = "Await {0} instead."; | |||
private static readonly string[] MethodNamesAddAddRange = ["Add", "AddRange"]; |
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.
private static readonly string[] MethodNamesAddAddRange = ["Add", "AddRange"]; | |
private static readonly string[] ExcludedMethodNames = ["Add", "AddRange"]; |
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 with a minor comment
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Quality Gate passed for 'Sonar .NET Java Plugin'Issues Measures |
Quality Gate passed for 'SonarAnalyzer for .NET'Issues Measures |
Peach validation: |
Fixes #9269