Skip to content

Commit

Permalink
[maintenance] Empty type termination using semicolon. (#6725)
Browse files Browse the repository at this point in the history
  • Loading branch information
glen-84 authored Nov 28, 2023
1 parent a090dab commit 96a74ac
Show file tree
Hide file tree
Showing 38 changed files with 53 additions and 4,694 deletions.
2 changes: 1 addition & 1 deletion src/CookieCrumble/src/CookieCrumble/LocalFactDiscoverer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace CookieCrumble;

[XunitTestCaseDiscoverer("LocalFactDiscoverer", "YourTestAssemblyName")]
public class LocalFactAttribute : FactAttribute { }
public class LocalFactAttribute : FactAttribute;

public class LocalFactDiscoverer : FactDiscoverer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ namespace HotChocolate;
/// </summary>
[Obsolete("Use [Service(ServiceKind.Pooled)] or [Service(ServiceKind.Resolver)]")]
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class ScopedServiceAttribute : Attribute { }
public sealed class ScopedServiceAttribute : Attribute;
2 changes: 1 addition & 1 deletion src/HotChocolate/Core/src/Abstractions/Types/IInputType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ namespace HotChocolate.Types;
///
/// Spec: https://spec.graphql.org/draft/#sec-Input-and-Output-Types
/// </summary>
public interface IInputType : IType, IHasRuntimeType { }
public interface IInputType : IType, IHasRuntimeType;
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ namespace HotChocolate.Types;
/// This marker interface identifies member of the type system like
/// types, directives, the schema or fields and arguments.
/// </summary>
public interface ITypeSystemMember { }
public interface ITypeSystemMember;
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ public interface IRequestExecutorOptionsAccessor
: IErrorHandlerOptionsAccessor
, IRequestTimeoutOptionsAccessor
, IComplexityAnalyzerOptionsAccessor
, IPersistedQueryOptionsAccessor
{ }
, IPersistedQueryOptionsAccessor;
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ private static T CreateDataLoader<T>(IServiceProvider services)
}
}

internal sealed class GetDataLoaderAttribute : Attribute { }
internal sealed class GetDataLoaderAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ namespace HotChocolate.Subscriptions.Diagnostics;
/// and they will all be notified in the registration order.
/// </summary>
/// <seealso cref="SubscriptionDiagnosticEventsListener"/>
public interface ISubscriptionDiagnosticEventsListener : ISubscriptionDiagnosticEvents { }
public interface ISubscriptionDiagnosticEventsListener : ISubscriptionDiagnosticEvents;
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ namespace HotChocolate.Types.Relay;
/// This attribute marks the node resolver in a relay node type.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public sealed class NodeResolverAttribute : Attribute { }
public sealed class NodeResolverAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -2689,13 +2689,13 @@ void Error()
Assert.Throws<ArgumentException>(Error);
}

public class ErrorObj1 { }
public class ErrorObj1;

public class ErrorObj2 { }
public class ErrorObj2;

public class ErrorObj3 { }
public class ErrorObj3;

public class ErrorObj4 { }
public class ErrorObj4;

public class ErrorObj5 { }
public class ErrorObj5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ public sealed record Street(string? Value) : ICityOrStreet;
public sealed record City(string? Value) : ICityOrStreet;

[UnionType]
public interface ICityOrStreet { }
public interface ICityOrStreet;

[Node]
[ExtendObjectType<Street>]
Expand Down Expand Up @@ -1090,7 +1090,7 @@ public ValueTask<AuthorizeResult> AuthorizeAsync(
}

[DirectiveType(DirectiveLocation.Object)]
public sealed class FooDirective { }
public sealed class FooDirective;

public sealed class FooDirectiveAttribute : ObjectTypeDescriptorAttribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ private sealed record Street(string? Value) : ICityOrStreet;

private sealed record City(string? Value) : ICityOrStreet;

private interface ICityOrStreet { }
private interface ICityOrStreet;

private sealed class AuthHandler : IAuthorizationHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public IError OnError(IError error)
}
}

public class SomeService { }
public class SomeService;

public class AggregateErrorFilter : IErrorFilter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,5 @@ protected override void Configure(IDirectiveTypeDescriptor<Resolve> descriptor)
}
}

public sealed class Resolve { }
public sealed class Resolve;
}
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/test/Types.Analyzers.Tests/SomeQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ public static Task<string> GetGenericById(
}
}

public class SomeService { }
public class SomeService;

public class GenericService<T> { }
public class GenericService<T>;
Loading

0 comments on commit 96a74ac

Please sign in to comment.