Skip to content

CC0072 reports on inherited method that cannot get renamed #1086

@n0099

Description

@n0099

Bug

protected sealed class SelectForUpdateCommandInterceptor : DbCommandInterceptor
{ // https://stackoverflow.com/questions/37984312/how-to-implement-select-for-update-in-ef-core/75086260#75086260
    public override ValueTask<InterceptionResult<object>> ScalarExecutingAsync(
        DbCommand command,
        CommandEventData eventData,
        InterceptionResult<object> result,
        CancellationToken cancellationToken = default)
    {
        ManipulateCommand(command);
        return new(result);
    }
}

Current output after fix applied (if it is a code fix bug):

public override ValueTask<InterceptionResult<object>> ScalarExecuting(
    DbCommand command,
    CommandEventData eventData,
    InterceptionResult<object> result,
    CancellationToken cancellationToken = default)
{
    ManipulateCommand(command);
    return new(result);
}

Expected output after fix applied (if it is a code fix bug):

Unchanged since it will break the overriding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions