Skip to content
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

[CORELIB-182] Fix dotnet and rider warnings, remove StyleCop leftovers #750

Merged
merged 21 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,10 @@ dotnet_diagnostic.IDE0058.severity = none

# Disable temporarily
dotnet_diagnostic.xUnit1051.severity = none

# Rider
resharper_inconsistent_naming_highlighting=hint

[test-bed/**/*.cs]
resharper_not_null_or_required_member_is_not_initialized_highlighting = none
resharper_class_never_instantiated_global_highlighting = none
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public class CQRSPipelineBuilder
{
public Func<CQRSObjectMetadata, bool> ObjectsFilter { get; set; } = _ => true;

public Action<ICQRSApplicationBuilder> Commands { get; set; } = app => { };
public Action<ICQRSApplicationBuilder> Queries { get; set; } = app => { };
public Action<ICQRSApplicationBuilder> Operations { get; set; } = app => { };
public Action<ICQRSApplicationBuilder> Commands { get; set; } = _ => { };
public Action<ICQRSApplicationBuilder> Queries { get; set; } = _ => { };
public Action<ICQRSApplicationBuilder> Operations { get; set; } = _ => { };

private readonly IEndpointRouteBuilder routeBuilder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ internal class LocalCallContext : HttpContext, IDisposable

public override IFeatureCollection Features => features;

public override ClaimsPrincipal User { get; set; }
public override string TraceIdentifier { get; set; }
public sealed override ClaimsPrincipal User { get; set; }
public sealed override string TraceIdentifier { get; set; }
public override HttpRequest Request { get; }
public override HttpResponse Response { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public void AddCQRSObjects(TypesCatalog contractsCatalog, TypesCatalog handlersC
continue;
}

var handlerCandidates = handlers[contract];
var handlerCandidates = handlers[contract].ToList();

if (handlerCandidates.Count() != 1)
if (handlerCandidates.Count != 1)
{
// TODO: shouldn't we throw here?
continue;
Expand Down