Skip to content

Commit 0f027f9

Browse files
authored
Updated code to remove unnecessary braces (#8338)
1 parent b16c2db commit 0f027f9

File tree

149 files changed

+236
-696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+236
-696
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ dotnet_diagnostic.IDE0305.severity = silent # see https://github.com/dotnet/rosl
185185
# Use collection expression for new.
186186
dotnet_diagnostic.IDE0306.severity = warning
187187
dotnet_style_prefer_collection_expression = when_types_exactly_match
188+
# Remove unnecessary braces.
189+
dotnet_diagnostic.RCS1251.severity = warning
188190
# Add/remove trailing comma.
189191
dotnet_diagnostic.RCS1260.severity = warning
190192
roslynator_trailing_comma_style = omit

src/HotChocolate/AspNetCore/src/AspNetCore/Instrumentation/IServerDiagnosticEventListener.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ namespace HotChocolate.AspNetCore.Instrumentation;
66
/// and they will all be called in the registration order.
77
/// </summary>
88
/// <seealso cref="ServerDiagnosticEventListener"/>
9-
public interface IServerDiagnosticEventListener : IServerDiagnosticEvents
10-
{
11-
}
9+
public interface IServerDiagnosticEventListener : IServerDiagnosticEvents;

src/HotChocolate/AzureFunctions/src/HotChocolate.AzureFunctions/GraphQLAttribute.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ namespace HotChocolate.AzureFunctions;
44

55
[Binding]
66
[AttributeUsage(AttributeTargets.Parameter)]
7-
public sealed class GraphQLAttribute : Attribute
8-
{
9-
}
7+
public sealed class GraphQLAttribute : Attribute;

src/HotChocolate/Caching/test/Caching.Tests/CacheControlDirectiveTypeTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,7 @@ public class InterfaceQuery
444444

445445
[UnionType("UnionType")]
446446
[CacheControl(500, Scope = CacheControlScope.Private, InheritMaxAge = true)]
447-
public interface IUnionType
448-
{
449-
}
447+
public interface IUnionType;
450448

451449
public class UnionObjectType : IUnionType
452450
{

src/HotChocolate/Core/src/Abstractions/DirectiveAttribute.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@ namespace HotChocolate;
22

33
[AttributeUsage(AttributeTargets.Parameter)]
44
public sealed class DirectiveAttribute
5-
: Attribute
6-
{
7-
}
5+
: Attribute;

src/HotChocolate/Core/src/Types/Types/Descriptors/Conventions/IConvention.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ namespace HotChocolate.Types.Descriptors;
44
/// This is a marker interface to collect registered type conventions from
55
/// the dependency injection container.
66
/// </summary>
7-
public interface IConvention : IHasScope
8-
{
9-
}
7+
public interface IConvention : IHasScope;

src/HotChocolate/Core/src/Types/Types/Introspection/IntrospectionTypeAttribute.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ namespace HotChocolate.Types;
88
Inherited = false,
99
AllowMultiple = false)]
1010
internal sealed class IntrospectionAttribute
11-
: Attribute
12-
{
13-
}
11+
: Attribute;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ namespace HotChocolate.Types.Relay;
33
/// <summary>
44
/// Marker interface for relay node types.
55
/// </summary>
6-
public interface INode
7-
{
8-
}
6+
public interface INode;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ namespace HotChocolate.Types;
55
/// in the GraphQL specification.
66
/// </summary>
77
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
8-
internal sealed class SpecScalarAttribute : Attribute
9-
{
10-
}
8+
internal sealed class SpecScalarAttribute : Attribute;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
namespace HotChocolate.Execution.DependencyInjection;
22

3-
public class SchemaRequestExecutorBuilderExtensionsTypeInterceptorTests
4-
{
5-
}
3+
public class SchemaRequestExecutorBuilderExtensionsTypeInterceptorTests;

0 commit comments

Comments
 (0)