Skip to content

Commit bb467ee

Browse files
Fix CA1805 & CA1711 (#157)
1 parent 41b8aa5 commit bb467ee

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

test/.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# See https://github.com/dotnet/roslyn-analyzers/blob/main/.editorconfig for an example on different settings and how they're used
22

33
[*.cs]
4-
# Disable these until they can be fixed
5-
dotnet_diagnostic.CA1805.severity = silent
6-
dotnet_diagnostic.CA1711.severity = silent
74

85
# Disabled
96
dotnet_diagnostic.CA1309.severity = silent # Use ordinal StringComparison - this isn't important for tests and just adds clutter

test/Common/TestUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Common
1313
/// </remarks>
1414
public static class TestUtils
1515
{
16-
internal static int ThreadId = 0;
16+
internal static int ThreadId;
1717

1818
/// <summary>
1919
/// Returns a mangled name that unique based on Prefix + Machine + Process

test/GlobalSuppressions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
// These suppression rules override parameters required by functions binding that cannot be converted to discard variables per issue: https://github.com/Azure/azure-functions-dotnet-worker/issues/323
1212
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Integration.AddProductExtraColumns.Run(Microsoft.AspNetCore.Http.HttpRequest,Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Common.ProductExtraColumns@)~Microsoft.AspNetCore.Mvc.IActionResult")]
1313
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Integration.AddProductMissingColumns.Run(Microsoft.AspNetCore.Http.HttpRequest,Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Common.ProductMissingColumns@)~Microsoft.AspNetCore.Mvc.IActionResult")]
14-
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Integration.AddProductMissingColumnsException.Run(Microsoft.AspNetCore.Http.HttpRequest,Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Common.ProductMissingColumns@)~Microsoft.AspNetCore.Mvc.IActionResult")]
14+
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Integration.AddProductMissingColumnsExceptionFunction.Run(Microsoft.AspNetCore.Http.HttpRequest,Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Common.ProductMissingColumns@)~Microsoft.AspNetCore.Mvc.IActionResult")]
1515
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Integration.AddProductsNoPartialUpsert.Run(Microsoft.AspNetCore.Http.HttpRequest,Microsoft.Azure.WebJobs.ICollector{Microsoft.Azure.WebJobs.Extensions.Sql.Samples.Common.Product})~Microsoft.AspNetCore.Mvc.IActionResult")]

test/Integration/AddProductMissingColumnsException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
namespace Microsoft.Azure.WebJobs.Extensions.Sql.Tests.Integration
1010
{
11-
public static class AddProductMissingColumnsException
11+
public static class AddProductMissingColumnsExceptionFunction
1212
{
13-
// This output binding should throw an error since the ProductsCostNotNull table does not
13+
// This output binding should throw an error since the ProductsCostNotNull table does not
1414
// allows rows without a Cost value.
15-
[FunctionName("AddProductMissingColumnsException")]
15+
[FunctionName("AddProductMissingColumnsExceptionFunction")]
1616
public static IActionResult Run(
1717
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "addproduct-missingcolumnsexception")]
1818
HttpRequest req,

test/Integration/SqlOutputBindingIntegrationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void AddProductMissingColumnsTest()
139139
[Fact]
140140
public void AddProductMissingColumnsNotNullTest()
141141
{
142-
this.StartFunctionHost(nameof(AddProductMissingColumnsException), true);
142+
this.StartFunctionHost(nameof(AddProductMissingColumnsExceptionFunction), true);
143143

144144
// Since the Sql table does not allow null for the Cost column,
145145
// inserting a row without a Cost value should throw an Exception.

0 commit comments

Comments
 (0)