Skip to content

Commit ee723de

Browse files
authored
Fixed various analyzer errors (#8472)
1 parent 1115d8a commit ee723de

File tree

15 files changed

+8
-18
lines changed

15 files changed

+8
-18
lines changed

src/HotChocolate/AspNetCore/src/AspNetCore.CommandLine/Command/ListCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private static Task ExecuteAsync(
3131
{
3232
var schemaNames = host.Services.GetRequiredService<IRequestExecutorProvider>().SchemaNames;
3333

34-
if(schemaNames.IsEmpty)
34+
if (schemaNames.IsEmpty)
3535
{
3636
console.WriteLine("No schemas registered.");
3737
return Task.CompletedTask;

src/HotChocolate/Core/src/Execution/Configuration/DefaultRequestExecutorOptionsMonitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public async ValueTask<ImmutableArray<string>> GetSchemaNamesAsync(
4141
CancellationToken cancellationToken)
4242
{
4343
await TryInitializeAsync(cancellationToken).ConfigureAwait(false);
44-
return [.._configs.Keys.Order()];
44+
return [.. _configs.Keys.Order()];
4545
}
4646

4747
private async ValueTask TryInitializeAsync(CancellationToken cancellationToken)

src/HotChocolate/Core/src/Execution/Configuration/IRequestExecutorOptionsMonitor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections.Immutable;
2-
31
namespace HotChocolate.Execution.Configuration;
42

53
/// <summary>

src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private static DefaultRequestExecutorBuilder CreateBuilder(
156156
builder.TryAddTypeInterceptor<DataLoaderRootFieldTypeInterceptor>();
157157
builder.TryAddTypeInterceptor<RequirementsTypeInterceptor>();
158158

159-
if(!services.Any(t =>
159+
if (!services.Any(t =>
160160
t.ServiceType == typeof(SchemaName)
161161
&& t.ImplementationInstance is SchemaName s
162162
&& s.Value.Equals(schemaName, StringComparison.Ordinal)))

src/HotChocolate/Core/src/Types/SchemaException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public SchemaException(IReadOnlyList<ISchemaError> errors)
2828

2929
private static string CreateErrorMessage(IReadOnlyList<ISchemaError> errors)
3030
{
31-
if (errors is null || errors.Count == 0)
31+
if (errors.Count == 0)
3232
{
3333
return SchemaException_UnexpectedError;
3434
}

src/HotChocolate/Core/src/Types/Types/Relay/NodeFieldResolvers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public static async ValueTask ResolveManyNodeAsync(
165165
SetLocalContext(nodeContext, nodeId, deserializedId, type);
166166
TryReplaceArguments(nodeContext, feature.NodeResolver, Ids, nodeId);
167167

168-
var result = await ExecutePipelineAsync(nodeContext, feature.NodeResolver);
168+
var result = await ExecutePipelineAsync(nodeContext, feature.NodeResolver);
169169

170170
if (result is IError error)
171171
{

src/HotChocolate/Core/src/Types/Types/Scalars/JsonType.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#nullable enable
22

3-
using System.Buffers;
43
using System.Runtime.InteropServices;
54
using System.Text.Json;
65
using HotChocolate.Buffers;

src/HotChocolate/Fusion-vnext/src/Fusion.Execution.Types/Collections/FusionEnumValueCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public bool TryGetValue(string name, [NotNullWhen(true)] out FusionEnumValue? va
5252

5353
bool IReadOnlyEnumValueCollection.TryGetValue(string name, [NotNullWhen(true)] out IEnumValue? value)
5454
{
55-
if(_map.TryGetValue(name, out var enumValue))
55+
if (_map.TryGetValue(name, out var enumValue))
5656
{
5757
value = enumValue;
5858
return true;

src/HotChocolate/Fusion-vnext/src/Fusion.Execution.Types/Completion/AggregateCompositeTypeInterceptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace HotChocolate.Fusion.Types.Completion;
66

77
internal sealed class AggregateCompositeTypeInterceptor : CompositeTypeInterceptor
88
{
9-
private readonly CompositeTypeInterceptor[] _interceptors;
9+
private readonly CompositeTypeInterceptor[] _interceptors;
1010

1111
public AggregateCompositeTypeInterceptor(CompositeTypeInterceptor[] interceptors)
1212
{

src/HotChocolate/Fusion-vnext/src/Fusion.Language/Nodes/ListValueSelectionNode.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections.Immutable;
2-
31
namespace HotChocolate.Fusion.Language;
42

53
/// <summary>

0 commit comments

Comments
 (0)