Skip to content
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 S6605 and S6617 FP: Replace DbSet check with IQueryable<T> check #7334

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

gregory-paidis-sonarsource
Copy link
Contributor

Fixes #7286

@@ -39,10 +39,6 @@ public abstract class InsteadOfAnyBase<TSyntaxKind, TInvocationExpression> : Son
KnownType.System_Collections_Generic_HashSet_T,
KnownType.System_Collections_Generic_SortedSet_T);

protected static readonly ImmutableArray<KnownType> DbSetTypes = ImmutableArray.Create(
KnownType.System_Data_Entity_DbSet_TEntity,
KnownType.Microsoft_EntityFrameworkCore_DbSet_TEntity);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DbSet implements IQueryable, so these are redundant.

Copy link
Contributor

@andrei-epure-sonarsource andrei-epure-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Jun 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Jun 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix S6605 and S6617 FP: Should not be applied to expressions used by EntityFramework
2 participants