Skip to content

Move class "extends"/implements/with to a new line when generics take a lot of space #1348

Closed
@rrousselGit

Description

@rrousselGit

Hello!

Consider the following code I dealt with earlier:

abstract class StreamNotifierProviderBase<
        NotifierT extends AsyncNotifierBase<T>,
        T> extends ProviderWithNotifier<AsyncValue<T>, NotifierT>
    with FutureModifier<T> {
// ...
}

With the way extends and generics are mixed up, this is fairly unreadable.
It's very hard with a quick glance to know what this class extends exactly.

I propose formatting such cases like the with:

abstract class StreamNotifierProviderBase<
        NotifierT extends AsyncNotifierBase<T>,
        T>
    extends ProviderWithNotifier<AsyncValue<T>, NotifierT>
    with FutureModifier<T> {
// ...
}

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