From b06654cc13574b66df655541a60688fd562baee7 Mon Sep 17 00:00:00 2001
From: Bart Koelman <10324372+bkoelman@users.noreply.github.com>
Date: Fri, 14 Nov 2025 01:39:07 +0100
Subject: [PATCH 01/26] Install .NET 10 in GHA workflows
---
.github/workflows/build.yml | 3 +++
.github/workflows/codeql.yml | 1 +
.github/workflows/qodana.yml | 1 +
3 files changed, 5 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 35313888ef..843f291fb2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -48,6 +48,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
+ 10.0.*
- name: Show installed versions
shell: pwsh
run: |
@@ -159,6 +160,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
+ 10.0.*
- name: Git checkout
uses: actions/checkout@v5
- name: Restore tools
@@ -218,6 +220,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
+ 10.0.*
- name: Git checkout
uses: actions/checkout@v5
with:
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 0ff1bb17be..35c8171615 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -28,6 +28,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
+ 10.0.*
- name: Git checkout
uses: actions/checkout@v5
- name: Initialize CodeQL
diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml
index 6a91aebccc..83405f8027 100644
--- a/.github/workflows/qodana.yml
+++ b/.github/workflows/qodana.yml
@@ -27,6 +27,7 @@ jobs:
dotnet-version: |
8.0.*
9.0.*
+ 10.0.*
- name: Git checkout
uses: actions/checkout@v5
with:
From 117bbc689291c8871d022718d75ec60081dbfaed Mon Sep 17 00:00:00 2001
From: Bart Koelman <10324372+bkoelman@users.noreply.github.com>
Date: Fri, 14 Nov 2025 00:38:22 +0100
Subject: [PATCH 02/26] Update to new R# major version
---
.config/dotnet-tools.json | 2 +-
.github/workflows/build.yml | 3 +++
cleanupcode.ps1 | 3 +++
inspectcode.ps1 | 1 +
4 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 9f4b9f1d56..4cd65cb7fd 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
- "version": "2025.2.4",
+ "version": "2025.3.0.2",
"commands": [
"jb"
],
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 843f291fb2..3e9f8edd9c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -170,6 +170,7 @@ jobs:
run: |
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ dotnet jb inspectcode --version
dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --format="xml" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --properties:RunAnalyzers=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
- name: Upload output to artifacts
uses: actions/upload-artifact@v4
@@ -239,12 +240,14 @@ jobs:
$baseCommitHash = git rev-parse HEAD~1
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
+ dotnet jb cleanupcode --version
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
- name: CleanupCode (on branch)
if: ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
shell: pwsh
run: |
Write-Output 'Running code cleanup on all files.'
+ dotnet jb cleanupcode --version
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN --fail-on-diff --print-diff
publish:
diff --git a/cleanupcode.ps1 b/cleanupcode.ps1
index b35d1cb215..d87c58a342 100644
--- a/cleanupcode.ps1
+++ b/cleanupcode.ps1
@@ -28,17 +28,20 @@ if ($revision) {
if ($baseCommitHash -eq $headCommitHash) {
Write-Output "Running code cleanup on staged/unstaged files."
+ dotnet jb cleanupcode --version
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN -f staged,modified
VerifySuccessExitCode
}
else {
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
+ dotnet jb cleanupcode --version
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
VerifySuccessExitCode
}
}
else {
Write-Output "Running code cleanup on all files."
+ dotnet jb cleanupcode --version
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN
VerifySuccessExitCode
}
diff --git a/inspectcode.ps1 b/inspectcode.ps1
index 21e96eac67..e3ae50660b 100644
--- a/inspectcode.ps1
+++ b/inspectcode.ps1
@@ -10,6 +10,7 @@ if ($LastExitCode -ne 0) {
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
$resultPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.html')
+dotnet jb inspectcode --version
dotnet jb inspectcode JsonApiDotNetCore.sln --dotnetcoresdk=$(dotnet --version) --build --output="$outputPath" --format="xml" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:RunAnalyzers=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
if ($LastExitCode -ne 0) {
From 72c62dd9a451c0d997b634970005531678e54177 Mon Sep 17 00:00:00 2001
From: Bart Koelman <10324372+bkoelman@users.noreply.github.com>
Date: Fri, 21 Nov 2025 01:04:24 +0100
Subject: [PATCH 03/26] Change severity of new R# inspections to warning
---
JsonApiDotNetCore.sln.DotSettings | 2 ++
1 file changed, 2 insertions(+)
diff --git a/JsonApiDotNetCore.sln.DotSettings b/JsonApiDotNetCore.sln.DotSettings
index 3576ab2bd8..e340302b69 100644
--- a/JsonApiDotNetCore.sln.DotSettings
+++ b/JsonApiDotNetCore.sln.DotSettings
@@ -72,8 +72,10 @@
WARNING
SUGGESTION
SUGGESTION
+ WARNING
SUGGESTION
WARNING
+ WARNING
DO_NOT_SHOW
WARNING
WARNING
From 6de8ade949c0049e5b41c1432c067b00d38d02e9 Mon Sep 17 00:00:00 2001
From: Bart Koelman <10324372+bkoelman@users.noreply.github.com>
Date: Fri, 14 Nov 2025 00:39:39 +0100
Subject: [PATCH 04/26] Resharper: use field keyword
---
.../IntegrationTests/EagerLoading/Building.cs | 8 +++-----
.../SerializerChangeTrackingTests.cs | 17 ++++++-----------
2 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs
index 78ab514636..3e66be191c 100644
--- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs
+++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs
@@ -9,8 +9,6 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.EagerLoading;
[Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.EagerLoading")]
public sealed class Building : Identifiable
{
- private string? _tempPrimaryDoorColor;
-
[Attr]
public string Number { get; set; } = null!;
@@ -24,7 +22,7 @@ public string PrimaryDoorColor
{
get
{
- if (_tempPrimaryDoorColor == null && PrimaryDoor == null)
+ if (field == null && PrimaryDoor == null)
{
// The ASP.NET model validator reads the value of this required property, to ensure it is not null.
// When creating a resource, BuildingDefinition ensures a value is assigned. But when updating a resource
@@ -33,7 +31,7 @@ public string PrimaryDoorColor
return null!;
}
- return _tempPrimaryDoorColor ?? PrimaryDoor!.Color;
+ return field ?? PrimaryDoor!.Color;
}
set
{
@@ -41,7 +39,7 @@ public string PrimaryDoorColor
{
// A request body is being deserialized. At this time, related entities have not been loaded yet.
// We cache the assigned value in a private field, so it can be used later.
- _tempPrimaryDoorColor = value;
+ field = value;
}
else
{
diff --git a/test/OpenApiNSwagClientTests/ChangeTracking/SerializerChangeTrackingTests.cs b/test/OpenApiNSwagClientTests/ChangeTracking/SerializerChangeTrackingTests.cs
index fb1e1f4b19..b0ca3c51bc 100644
--- a/test/OpenApiNSwagClientTests/ChangeTracking/SerializerChangeTrackingTests.cs
+++ b/test/OpenApiNSwagClientTests/ChangeTracking/SerializerChangeTrackingTests.cs
@@ -802,13 +802,11 @@ public async Task Can_track_multiple_times_in_same_request_document()
[UsedImplicitly(ImplicitUseTargetFlags.Members)]
private sealed class ComplexType : NotifyPropertySet
{
- private DateTime? _nullableDateTime;
-
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)]
public DateTime? NullableDateTime
{
- get => _nullableDateTime;
- set => SetProperty(ref _nullableDateTime, value);
+ get;
+ set => SetProperty(ref field, value);
}
public NestedType? NestedType { get; set; }
@@ -817,21 +815,18 @@ public DateTime? NullableDateTime
[UsedImplicitly(ImplicitUseTargetFlags.Members)]
private sealed class NestedType : NotifyPropertySet
{
- private int? _nullableInt;
- private string? _nullableString;
-
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)]
public int? NullableInt
{
- get => _nullableInt;
- set => SetProperty(ref _nullableInt, value);
+ get;
+ set => SetProperty(ref field, value);
}
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore)]
public string? NullableString
{
- get => _nullableString;
- set => SetProperty(ref _nullableString, value);
+ get;
+ set => SetProperty(ref field, value);
}
}
From 3ff65835899f0cac2382238c8ab18c4c613bd564 Mon Sep 17 00:00:00 2001
From: Bart Koelman <10324372+bkoelman@users.noreply.github.com>
Date: Fri, 14 Nov 2025 00:35:24 +0100
Subject: [PATCH 05/26] Fix IDE0340: Use unbound generic type
---
.../TreeNodes/TableSourceNode.cs | 2 +-
.../DocumentationOpenApiOperationFilter.cs | 19 +++++++++----------
.../JsonApiDataContractResolver.cs | 2 +-
.../Configuration/JsonApiValidationFilter.cs | 2 +-
.../Configuration/ResourceGraphBuilder.cs | 2 +-
.../Errors/InvalidModelStateException.cs | 2 +-
.../Queries/Parsing/FilterParser.cs | 2 +-
.../Queries/QueryLayerComposer.cs | 2 +-
.../Queries/SparseFieldSetCache.cs | 2 +-
...parseFieldSetQueryStringParameterReader.cs | 2 +-
.../Resources/IdentifiableExtensions.cs | 2 +-
.../JsonConverters/ResourceObjectConverter.cs | 2 +-
.../Serialization/Response/LinkBuilder.cs | 8 +++-----
.../Response/ResponseModelAdapter.cs | 2 +-
.../CompositeKeys/CarExpressionRewriter.cs | 2 +-
.../ReadWrite/Creating/CreateResourceTests.cs | 6 +++---
...reateResourceWithClientGeneratedIdTests.cs | 12 ++++++------
.../Updating/Resources/UpdateResourceTests.cs | 4 ++--
.../ResourceGraphBuilderTests.cs | 2 +-
test/TestBuildingBlocks/Unknown.cs | 2 +-
20 files changed, 38 insertions(+), 41 deletions(-)
diff --git a/src/Examples/DapperExample/TranslationToSql/TreeNodes/TableSourceNode.cs b/src/Examples/DapperExample/TranslationToSql/TreeNodes/TableSourceNode.cs
index 62ff5ad3ef..4b0fa2d5b5 100644
--- a/src/Examples/DapperExample/TranslationToSql/TreeNodes/TableSourceNode.cs
+++ b/src/Examples/DapperExample/TranslationToSql/TreeNodes/TableSourceNode.cs
@@ -7,7 +7,7 @@ namespace DapperExample.TranslationToSql.TreeNodes;
///
internal abstract class TableSourceNode(string? alias) : SqlTreeNode
{
- public const string IdColumnName = nameof(Identifiable