From 664ab2e25e040c0fc9405d44da544ce74194c360 Mon Sep 17 00:00:00 2001 From: Kasper van Knotsenburg Date: Tue, 11 Mar 2025 14:04:15 +0100 Subject: [PATCH 1/3] update .Net version to 8.0 (LTS) --- IntegrationTests/DataBuilderIntegrationTests.csproj | 2 +- Tests/DataBuilderTests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IntegrationTests/DataBuilderIntegrationTests.csproj b/IntegrationTests/DataBuilderIntegrationTests.csproj index 2f25f0b..04bb8a2 100644 --- a/IntegrationTests/DataBuilderIntegrationTests.csproj +++ b/IntegrationTests/DataBuilderIntegrationTests.csproj @@ -1,7 +1,7 @@  - net5.0 + net8.0 enable Preview false diff --git a/Tests/DataBuilderTests.csproj b/Tests/DataBuilderTests.csproj index 0ac34ed..c961d12 100644 --- a/Tests/DataBuilderTests.csproj +++ b/Tests/DataBuilderTests.csproj @@ -1,7 +1,7 @@  - net5.0 + net8.0 enable false true From 283b546a44856049602b9733a125fed604f6c6e2 Mon Sep 17 00:00:00 2001 From: Kasper van Knotsenburg Date: Tue, 11 Mar 2025 14:14:02 +0100 Subject: [PATCH 2/3] Update all deps to most recenpt version, except for FluentAssertions; which i updated to the lastest non-commercial version. --- Attributes/Attributes.csproj | 4 ++++ .../DataBuilderGenerator.csproj | 10 +++++++--- .../DataBuilderIntegrationTests.csproj | 15 ++++++++++----- Tests/DataBuilderTests.csproj | 19 ++++++++++++------- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/Attributes/Attributes.csproj b/Attributes/Attributes.csproj index 60866a6..f3b5c17 100644 --- a/Attributes/Attributes.csproj +++ b/Attributes/Attributes.csproj @@ -7,4 +7,8 @@ Support package for DasMulli.DataBuilderGenerator, containing the [GenerateDataBuilder] attribute. Directly reference DasMulli.DataBuilderGenerator for best results. + + + + diff --git a/DataBuilderGenerator/DataBuilderGenerator.csproj b/DataBuilderGenerator/DataBuilderGenerator.csproj index 4700e82..93f9fee 100644 --- a/DataBuilderGenerator/DataBuilderGenerator.csproj +++ b/DataBuilderGenerator/DataBuilderGenerator.csproj @@ -13,9 +13,9 @@ - - - + + + @@ -25,6 +25,10 @@ + + + + $(BeforePack);IncludeOutputAsAnalyzer diff --git a/IntegrationTests/DataBuilderIntegrationTests.csproj b/IntegrationTests/DataBuilderIntegrationTests.csproj index 04bb8a2..ec64ef1 100644 --- a/IntegrationTests/DataBuilderIntegrationTests.csproj +++ b/IntegrationTests/DataBuilderIntegrationTests.csproj @@ -9,11 +9,12 @@ - - - - - + + + + + + @@ -21,4 +22,8 @@ + + + + diff --git a/Tests/DataBuilderTests.csproj b/Tests/DataBuilderTests.csproj index c961d12..2199473 100644 --- a/Tests/DataBuilderTests.csproj +++ b/Tests/DataBuilderTests.csproj @@ -10,13 +10,14 @@ - - - - - - - + + + + + + + + @@ -24,4 +25,8 @@ + + + + From 12116a60d1cafb3da0d412ebbe631173f7e08ba3 Mon Sep 17 00:00:00 2001 From: Kasper van Knotsenburg Date: Tue, 11 Mar 2025 14:32:45 +0100 Subject: [PATCH 3/3] Prefer IsKind(...) over Kind() == ... --- DataBuilderGenerator/DataBuilderGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataBuilderGenerator/DataBuilderGenerator.cs b/DataBuilderGenerator/DataBuilderGenerator.cs index 661884b..fe37933 100644 --- a/DataBuilderGenerator/DataBuilderGenerator.cs +++ b/DataBuilderGenerator/DataBuilderGenerator.cs @@ -95,7 +95,7 @@ private static Dictionary DetermineBuildersToGenerate generationBlocked = true; } - if (typeNode.Modifiers.Any(m => m.Kind() == SyntaxKind.PartialKeyword)) + if (typeNode.Modifiers.Any(m => m.IsKind(SyntaxKind.PartialKeyword))) { context.ReportDiagnostic(Diagnostic.Create(GeneratorOnPartialDiagnostic, typeNode.GetLocation(), typeSymbol.Name));