Skip to content

Commit 249ed6f

Browse files
authored
Update to ReSharper 2026.1 (#1930)
* Update to stable R# 2026.1.x * R#: Switch to new setting to show SWEA warnings in IDE * Fixed R# warning: Convert into method group * Fixed R# warning: the nullable suppression is redundant * R#: Auto-arrange property accessors on cleanup * R#: Use string.Empty instead of "" * Fixed R# warning: use string.Empty * R#: Disable notification about overload resolution change * R#: Separate local function with return * R#: Enforce using extension blocks * Revert "R#: Enforce using extension blocks" This reverts commit e4d8ad4. * R#: Use range indexer * R#: Update member layout to new XML format * Fix CA1830: Prefer strongly-typed StringBuilder overload
1 parent 1f6bb9c commit 249ed6f

File tree

17 files changed

+54
-52
lines changed

17 files changed

+54
-52
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2025.3.4",
6+
"version": "2026.1.0.1",
77
"commands": [
88
"jb"
99
],

JsonApiDotNetCore.slnx.DotSettings

Lines changed: 34 additions & 29 deletions
Large diffs are not rendered by default.

src/Examples/DapperExample/TranslationToSql/Builders/SqlQueryBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ private void AppendOnNewLine(string? value, StringBuilder builder)
452452
builder.AppendLine();
453453
}
454454

455-
builder.Append(new string(' ', _indentDepth * 4));
455+
builder.Append(' ', _indentDepth * 4);
456456
builder.Append(value);
457457
}
458458
}

src/JsonApiDotNetCore/AtomicOperations/Processors/AddToRelationshipProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public AddToRelationshipProcessor(IAddToRelationshipService<TResource, TId> serv
2626
var leftId = (TId)operation.Resource.GetTypedId();
2727
ISet<IIdentifiable> rightResourceIds = operation.GetSecondaryResources();
2828

29-
await _service.AddToToManyRelationshipAsync(leftId!, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
29+
await _service.AddToToManyRelationshipAsync(leftId, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
3030

3131
return null;
3232
}

src/JsonApiDotNetCore/AtomicOperations/Processors/DeleteProcessor.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ public DeleteProcessor(IDeleteService<TResource, TId> service)
2424
ArgumentNullException.ThrowIfNull(operation);
2525

2626
var id = (TId)operation.Resource.GetTypedId();
27-
#pragma warning disable CS8607 // A possible null value may not be used for a type marked with [NotNull] or [DisallowNull]
28-
// Justification: Temporary workaround for R# bug at https://youtrack.jetbrains.com/issue/RSRP-503026.
2927
await _service.DeleteAsync(id, cancellationToken);
30-
#pragma warning restore CS8607 // A possible null value may not be used for a type marked with [NotNull] or [DisallowNull]
3128

3229
return null;
3330
}

src/JsonApiDotNetCore/AtomicOperations/Processors/RemoveFromRelationshipProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public RemoveFromRelationshipProcessor(IRemoveFromRelationshipService<TResource,
2626
var leftId = (TId)operation.Resource.GetTypedId();
2727
ISet<IIdentifiable> rightResourceIds = operation.GetSecondaryResources();
2828

29-
await _service.RemoveFromToManyRelationshipAsync(leftId!, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
29+
await _service.RemoveFromToManyRelationshipAsync(leftId, operation.Request.Relationship!.PublicName, rightResourceIds, cancellationToken);
3030

3131
return null;
3232
}

src/JsonApiDotNetCore/AtomicOperations/Processors/SetRelationshipProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public SetRelationshipProcessor(ISetRelationshipService<TResource, TId> service)
2727
var leftId = (TId)operation.Resource.GetTypedId();
2828
object? rightValue = GetRelationshipRightValue(operation);
2929

30-
await _service.SetRelationshipAsync(leftId!, operation.Request.Relationship!.PublicName, rightValue, cancellationToken);
30+
await _service.SetRelationshipAsync(leftId, operation.Request.Relationship!.PublicName, rightValue, cancellationToken);
3131

3232
return null;
3333
}

src/JsonApiDotNetCore/Diagnostics/CascadingCodeTimer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ private void WriteResult(StringBuilder builder, int indent, TimeSpan timeElapsed
263263

264264
private static void WriteIndent(StringBuilder builder, int indent)
265265
{
266-
builder.Append(new string(' ', indent * 2));
266+
builder.Append(' ', indent * 2);
267267
}
268268

269269
private void WritePadding(StringBuilder builder, int indent, int paddingLength)

src/JsonApiDotNetCore/Middleware/JsonApiMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public async Task InvokeAsync(HttpContext httpContext, IJsonApiRequest request)
9898
if (CodeTimingSessionManager.IsEnabled && _logger.IsEnabled(LogLevel.Information))
9999
{
100100
string timingResults = CodeTimingSessionManager.Current.GetResults();
101-
string requestMethod = httpContext.Request.Method.Replace(Environment.NewLine, "");
101+
string requestMethod = httpContext.Request.Method.Replace(Environment.NewLine, string.Empty);
102102
string requestUrl = httpContext.Request.GetEncodedUrl();
103103
LogMeasurement(requestMethod, requestUrl, Environment.NewLine, timingResults);
104104
}

src/JsonApiDotNetCore/Queries/Expressions/SortExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public override string ToString()
4848

4949
public override string ToFullString()
5050
{
51-
return $"{string.Join(',', Elements.Select(child => child.ToFullString()))}{(IsAutoGenerated ? " (auto-generated)" : "")}";
51+
return $"{string.Join(',', Elements.Select(child => child.ToFullString()))}{(IsAutoGenerated ? " (auto-generated)" : string.Empty)}";
5252
}
5353

5454
public override bool Equals(object? obj)

0 commit comments

Comments
 (0)