Skip to content

Commit

Permalink
Support Microsoft.Data.SqlClient in S2857. (#6351)
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Feb 23, 2023
1 parent bb07dd6 commit 53f1a8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Expand Up @@ -41,6 +41,7 @@ public sealed class SqlKeywordsDelimitedBySpace : SonarDiagnosticAnalyzer
CSharpSyntaxHelper.BuildQualifiedNameSyntax("System", "Data", "Entity"),
CSharpSyntaxHelper.BuildQualifiedNameSyntax("System", "Data", "Odbc"),
CSharpSyntaxHelper.BuildQualifiedNameSyntax("System", "Data", "OracleClient"),
CSharpSyntaxHelper.BuildQualifiedNameSyntax("Microsoft", "Data", "SqlClient"),
CSharpSyntaxHelper.BuildQualifiedNameSyntax("Microsoft", "Data", "Sqlite"),
SyntaxFactory.IdentifierName("Dapper"),
SyntaxFactory.IdentifierName("NHibernate"),
Expand Down
Expand Up @@ -77,6 +77,7 @@ internal static class NuGetMetadataReference
public static References MicrosoftAzureWebJobsExtensionsDurableTask(string packageVersion = Constants.NuGetLatestVersion) => Create("Microsoft.Azure.WebJobs.Extensions.DurableTask", packageVersion);
public static References MicrosoftAzureWebJobsExtensionsHttp(string packageVersion = Constants.NuGetLatestVersion) => Create("Microsoft.Azure.WebJobs.Extensions.Http", packageVersion);
public static References MicrosoftBuildNoTargets(string packageVersion = "3.1.0") => Create("Microsoft.Build.NoTargets", packageVersion);
public static References MicrosoftDataSqlClient(string packageVersion = "5.1.0") => Create("Microsoft.Data.SqlClient", packageVersion);
public static References MicrosoftDataSqliteCore(string packageVersion = "2.0.0") => Create("Microsoft.Data.Sqlite.Core", packageVersion);
public static References MicrosoftEntityFrameworkCore(string packageVersion) => Create("Microsoft.EntityFrameworkCore", packageVersion);
public static References MicrosoftEntityFrameworkCoreSqliteCore(string packageVersion) => Create("Microsoft.EntityFrameworkCore.Sqlite.Core", packageVersion);
Expand Down
Expand Up @@ -82,6 +82,7 @@ public class SqlKeywordsDelimitedBySpaceTest
[DataRow("System.Data.Entity")]
[DataRow("System.Data.Odbc")]
[DataRow("Dapper")]
[DataRow("Microsoft.Data.SqlClient")]
[DataRow("Microsoft.Data.Sqlite")]
[DataRow("NHibernate")]
[DataRow("PetaPoco")]
Expand All @@ -91,6 +92,7 @@ public class SqlKeywordsDelimitedBySpaceTest
.AddReferences(MetadataReferenceFacade.SystemData)
.AddReferences(NuGetMetadataReference.Dapper())
.AddReferences(NuGetMetadataReference.EntityFramework())
.AddReferences(NuGetMetadataReference.MicrosoftDataSqlClient())
.AddReferences(NuGetMetadataReference.MicrosoftDataSqliteCore())
.AddReferences(NuGetMetadataReference.MicrosoftSqlServerCompact())
.AddReferences(NuGetMetadataReference.NHibernate())
Expand Down

0 comments on commit 53f1a8d

Please sign in to comment.