From 699af410ce05e693096c04cb888af6e560ef9204 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Aug 2026 23:58:26 +0000 Subject: [PATCH 1/2] Bump Roslynator.Analyzers from 4.16.1 to 5.0.0 --- updated-dependencies: - dependency-name: Roslynator.Analyzers dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: analyzers ... Signed-off-by: dependabot[bot] --- Directory.Build.props | 92 +++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 5d80558..fbaba47 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,46 +1,46 @@ - - - - - - David Liebeherr - rent-a-developer - Copyright © rent-a-developer / David Liebeherr - - - - enable - latest - enable - true - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + + + David Liebeherr + rent-a-developer + Copyright © rent-a-developer / David Liebeherr + + + + enable + latest + enable + true + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + From 7b80b8e99813d4a4a4fdc99e2ef49b5507b01473 Mon Sep 17 00:00:00 2001 From: David Liebeherr Date: Sun, 23 Aug 2026 01:28:29 +0200 Subject: [PATCH 2/2] chore: migrated editorconfig rules to Roslynator.Analyzers 5.0.0 and fixed/suppressed new found violations --- .editorconfig | 19 +++- Directory.Build.props | 92 +++++++++---------- .../Benchmarks.Query_Dynamic.cs | 4 +- .../DbConnectionPlus.Benchmarks/Benchmarks.cs | 2 +- .../EntityManipulator.InsertEntityTests.cs | 6 +- .../EntityManipulator.UpdateEntityTests.cs | 6 +- ...tionExtensions.QueryFirstOrDefaultTests.cs | 2 +- ...ionExtensions.QuerySingleOrDefaultTests.cs | 2 +- .../DbConnectionPlus.IntegrationTests.csproj | 2 +- .../IntegrationTestsBase.cs | 8 +- ...ommandDisposingDataReaderDecoratorTests.cs | 4 +- .../DbCommands/DbCommandBuilderTests.cs | 2 +- .../DbCommands/DbCommandDisposerTests.cs | 8 +- .../DbCommands/DbCommandHelperTests.cs | 2 +- .../DbConnectionPlus.UnitTests.csproj | 4 +- .../TestData/Generate.cs | 2 + .../TestData/TestEnum.cs | 2 +- 17 files changed, 95 insertions(+), 72 deletions(-) diff --git a/.editorconfig b/.editorconfig index 249c12b..642ed7f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,6 @@ -[*.cs] +root = true + +[*.cs] max_line_length = 120 charset = utf-8 @@ -173,3 +175,18 @@ dotnet_diagnostic.S4456.severity = none [*.ps1] end_of_line = crlf + +[{tests,benchmarks}/**/*.cs] + +dotnet_diagnostic.S2344.severity = none +dotnet_diagnostic.S3010.severity = none +dotnet_diagnostic.S4144.severity = none +dotnet_diagnostic.S3459.severity = none +dotnet_diagnostic.S3453.severity = none +dotnet_diagnostic.S1144.severity = none +dotnet_diagnostic.S1172.severity = none +dotnet_diagnostic.S3963.severity = none +dotnet_diagnostic.S6562.severity = none +dotnet_diagnostic.S2925.severity = none +dotnet_diagnostic.S5034.severity = none +dotnet_diagnostic.S2696.severity = none diff --git a/Directory.Build.props b/Directory.Build.props index fbaba47..5260d22 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,46 +1,46 @@ - - - - - - David Liebeherr - rent-a-developer - Copyright © rent-a-developer / David Liebeherr - - - - enable - latest - enable - true - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + + + David Liebeherr + rent-a-developer + Copyright © rent-a-developer / David Liebeherr + + + + enable + latest + enable + true + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.Query_Dynamic.cs b/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.Query_Dynamic.cs index 8393e72..c3daac9 100644 --- a/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.Query_Dynamic.cs +++ b/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.Query_Dynamic.cs @@ -53,7 +53,7 @@ public List Query_Dynamic_Command() ["ByteValue"] = dataReader.GetByte(ordinal++), ["CharValue"] = dataReader.GetChars(ordinal++, 0, charBuffer, 0, 1) == 1 ? charBuffer[0] - : throw new(), + : throw new InvalidOperationException(), ["DateTimeValue"] = DateTime.Parse(dataReader.GetString(ordinal++), CultureInfo.InvariantCulture), ["DecimalValue"] = Decimal.Parse(dataReader.GetString(ordinal++), CultureInfo.InvariantCulture), ["DoubleValue"] = dataReader.GetDouble(ordinal++), @@ -62,7 +62,7 @@ public List Query_Dynamic_Command() ["Int32Value"] = (Int32)dataReader.GetInt64(ordinal++), ["Int64Value"] = dataReader.GetInt64(ordinal++), ["SingleValue"] = dataReader.GetFloat(ordinal++), - ["StringValue"] = dataReader.GetString(ordinal++) + ["StringValue"] = dataReader.GetString(ordinal) }; entities.Add(new DataRow(dictionary)); diff --git a/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.cs b/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.cs index 18ee3c4..d778688 100644 --- a/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.cs +++ b/benchmarks/DbConnectionPlus.Benchmarks/Benchmarks.cs @@ -77,7 +77,7 @@ private static BenchmarkEntity ReadEntity(IDataReader dataReader) BooleanValue = dataReader.GetInt64(ordinal++) == 1, BytesValue = (Byte[])dataReader.GetValue(ordinal++), ByteValue = dataReader.GetByte(ordinal++), - CharValue = dataReader.GetChars(ordinal++, 0, charBuffer, 0, 1) == 1 ? charBuffer[0] : throw new(), + CharValue = dataReader.GetChars(ordinal++, 0, charBuffer, 0, 1) == 1 ? charBuffer[0] : throw new InvalidOperationException(), DateTimeValue = DateTime.Parse(dataReader.GetString(ordinal++), CultureInfo.InvariantCulture), DecimalValue = Decimal.Parse(dataReader.GetString(ordinal++), CultureInfo.InvariantCulture), DoubleValue = dataReader.GetDouble(ordinal++), diff --git a/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.InsertEntityTests.cs b/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.InsertEntityTests.cs index ce35e76..87bde38 100644 --- a/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.InsertEntityTests.cs +++ b/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.InsertEntityTests.cs @@ -109,7 +109,7 @@ await this.CallApi( TestContext.Current.CancellationToken ); - this.Connection.QueryFirst($"SELECT * FROM {Q("MappingTestEntity")}") + (await this.Connection.QueryFirstAsync($"SELECT * FROM {Q("MappingTestEntity")}")) .Should().BeEquivalentTo( entity, options => options.Using(context => context.Subject.Should().BeNull()) @@ -137,7 +137,7 @@ await this.CallApi( TestContext.Current.CancellationToken ); - this.Connection.QueryFirst($"SELECT * FROM {Q("MappingTestEntity")}") + (await this.Connection.QueryFirstAsync($"SELECT * FROM {Q("MappingTestEntity")}")) .Should().BeEquivalentTo( entity, options => options.Using(context => context.Subject.Should().BeNull()) @@ -160,7 +160,7 @@ await this.CallApi( TestContext.Current.CancellationToken ); - this.Connection.QueryFirst($"SELECT * FROM {Q("MappingTestEntity")}") + (await this.Connection.QueryFirstAsync($"SELECT * FROM {Q("MappingTestEntity")}")) .Should().BeEquivalentTo(entity); } diff --git a/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.UpdateEntityTests.cs b/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.UpdateEntityTests.cs index 0e48679..609177c 100644 --- a/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.UpdateEntityTests.cs +++ b/tests/DbConnectionPlus.IntegrationTests/DatabaseAdapters/EntityManipulator.UpdateEntityTests.cs @@ -195,7 +195,7 @@ await this.CallApi( TestContext.Current.CancellationToken ); - this.Connection.QueryFirst($"SELECT * FROM {Q("MappingTestEntity")}") + (await this.Connection.QueryFirstAsync($"SELECT * FROM {Q("MappingTestEntity")}")) .Should().BeEquivalentTo( updatedEntity, options => options.Using(context => context.Subject.Should().BeNull()) @@ -225,7 +225,7 @@ await this.CallApi( TestContext.Current.CancellationToken ); - this.Connection.QueryFirst($"SELECT * FROM {Q("MappingTestEntity")}") + (await this.Connection.QueryFirstAsync($"SELECT * FROM {Q("MappingTestEntity")}")) .Should().BeEquivalentTo( updatedEntity, options => options.Using(context => context.Subject.Should().BeNull()) @@ -271,7 +271,7 @@ await this.CallApi( TestContext.Current.CancellationToken ); - this.Connection.QueryFirst($"SELECT * FROM {Q("MappingTestEntity")}") + (await this.Connection.QueryFirstAsync($"SELECT * FROM {Q("MappingTestEntity")}")) .Should().BeEquivalentTo(updatedEntity); } diff --git a/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QueryFirstOrDefaultTests.cs b/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QueryFirstOrDefaultTests.cs index 029a75e..a723cf6 100644 --- a/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QueryFirstOrDefaultTests.cs +++ b/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QueryFirstOrDefaultTests.cs @@ -200,7 +200,7 @@ Boolean useAsyncApi dataRow .Should().NotBeNull(); - dataRow!["Id"] + dataRow["Id"] .Should().Be(entityIds[0]); this.ExistsTemporaryTableInDb(temporaryTableName) diff --git a/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QuerySingleOrDefaultTests.cs b/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QuerySingleOrDefaultTests.cs index 9ff9681..097c44b 100644 --- a/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QuerySingleOrDefaultTests.cs +++ b/tests/DbConnectionPlus.IntegrationTests/DbConnectionExtensions.QuerySingleOrDefaultTests.cs @@ -221,7 +221,7 @@ Boolean useAsyncApi dataRow .Should().NotBeNull(); - dataRow!["Id"] + dataRow["Id"] .Should().Be(entityId); this.ExistsTemporaryTableInDb(temporaryTableName) diff --git a/tests/DbConnectionPlus.IntegrationTests/DbConnectionPlus.IntegrationTests.csproj b/tests/DbConnectionPlus.IntegrationTests/DbConnectionPlus.IntegrationTests.csproj index 3e30201..0f92514 100644 --- a/tests/DbConnectionPlus.IntegrationTests/DbConnectionPlus.IntegrationTests.csproj +++ b/tests/DbConnectionPlus.IntegrationTests/DbConnectionPlus.IntegrationTests.csproj @@ -20,7 +20,7 @@ - + all diff --git a/tests/DbConnectionPlus.UnitTests/TestData/Generate.cs b/tests/DbConnectionPlus.UnitTests/TestData/Generate.cs index 8d57738..1697765 100644 --- a/tests/DbConnectionPlus.UnitTests/TestData/Generate.cs +++ b/tests/DbConnectionPlus.UnitTests/TestData/Generate.cs @@ -105,7 +105,9 @@ static Generate() } ); +#pragma warning disable S2930 var cancellationTokenSource = new CancellationTokenSource(); +#pragma warning restore S2930 fixture.Register(() => cancellationTokenSource.Token); TypeAdapterConfig diff --git a/tests/DbConnectionPlus.UnitTests/TestData/TestEnum.cs b/tests/DbConnectionPlus.UnitTests/TestData/TestEnum.cs index 722bfb2..988010a 100644 --- a/tests/DbConnectionPlus.UnitTests/TestData/TestEnum.cs +++ b/tests/DbConnectionPlus.UnitTests/TestData/TestEnum.cs @@ -2,7 +2,7 @@ namespace RentADeveloper.DbConnectionPlus.UnitTests.TestData; -public enum TestEnum : Int32 +public enum TestEnum { Value1 = 1, Value2 = 2,