-
Notifications
You must be signed in to change notification settings - Fork 227
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 #9269
Labels
Area: C#
C# rules related issues.
Sprint: Hardening
Fix FPs/FNs/improvements
Type: False Positive
Rule IS triggered when it shouldn't be.
Milestone
Comments
Thank you, @CaringDev, for pointing this out. It is indeed a false positive. PR #9272 documents the misbehavior, and we will track this issue in our backlog. |
martin-strecker-sonarsource
added
Type: False Positive
Rule IS triggered when it shouldn't be.
Area: C#
C# rules related issues.
labels
May 13, 2024
Duplicated by #9301 |
mary-georgiou-sonarsource
pushed a commit
that referenced
this issue
May 23, 2024
martin-strecker-sonarsource
changed the title
Fix S6966 FP: EntityFramework DbContext
Fix S6966 FP: EntityFrameworks DbContext/DBSet Add/AddRange methods are preferred over there Asnyc counterpart
May 23, 2024
martin-strecker-sonarsource
changed the title
Fix S6966 FP: EntityFrameworks DbContext/DBSet Add/AddRange methods are preferred over there Asnyc counterpart
Fix S6966 FP: EntityFrameworks DbContext/DBSet Add/AddRange methods are preferred over their Asnyc counterpart
May 23, 2024
github-actions
bot
assigned mary-georgiou-sonarsource and martin-strecker-sonarsource and unassigned martin-strecker-sonarsource and mary-georgiou-sonarsource
May 23, 2024
I assume this will be fixed in 9.26? Then it should be assigned to that milestone. |
zsolt-kolbay-sonarsource
changed the title
Fix S6966 FP: EntityFrameworks DbContext/DBSet Add/AddRange methods are preferred over their Asnyc counterpart
Fix S6966 FP: EntityFrameworks DbContext/DBSet Add/AddRange methods are preferred over their Async counterpart
May 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: C#
C# rules related issues.
Sprint: Hardening
Fix FPs/FNs/improvements
Type: False Positive
Rule IS triggered when it shouldn't be.
Description
S6966 should not fire for DbContext.Add as AddAsync is meant for special purposes only:
Repro steps
Expected behavior
No S6966 for DbContext.Add
Actual behavior
S6966 is generated for the given example
Known workarounds
Suppress warning (in code, config, ...)
Related information
SonarAnalyzer.CSharp 9.25.0.90414
The text was updated successfully, but these errors were encountered: