Skip to content

remove redundant Empty constructor and mark as warning #5378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@ csharp_style_unused_value_expression_statement_preference = discard_variable:sil
# IDE0290: Use primary constructor
csharp_style_prefer_primary_constructors = false

# Empty constructor
resharper_empty_constructor_highlighting = warning

# IDE0300: Simplify collection initialization
dotnet_style_prefer_collection_expression = false

Expand Down
2 changes: 1 addition & 1 deletion samples/Playground/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static async Task<int> Main(string[] args)
}
}

internal sealed class DummyAdapter() : ITestFramework, IDataProducer
internal sealed class DummyAdapter : ITestFramework, IDataProducer
{
public string Uid => nameof(DummyAdapter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Testing.Extensions.HangDump.Serializers;

internal sealed class ExitSignalActivityIndicatorTaskRequest() : IRequest;
internal sealed class ExitSignalActivityIndicatorTaskRequest : IRequest;

internal sealed class ExitSignalActivityIndicatorTaskRequestSerializer : BaseSerializer, INamedPipeSerializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Testing.Extensions.HangDump.Serializers;

internal sealed class GetInProgressTestsRequest() : IRequest;
internal sealed class GetInProgressTestsRequest : IRequest;

internal sealed class GetInProgressTestsRequestSerializer : BaseSerializer, INamedPipeSerializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Testing.Extensions.HangDump.Serializers;

internal sealed class SessionEndSerializerRequest() : IRequest;
internal sealed class SessionEndSerializerRequest : IRequest;

internal sealed class SessionEndSerializerRequestSerializer : BaseSerializer, INamedPipeSerializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Testing.Platform.ServerMode;

internal abstract record RpcMessage();
internal abstract record RpcMessage;

/// <summary>
/// A request is a message for which the server should return a corresponding
Expand Down