Skip to content

FirstWhereRule #1005

Closed
Closed
@ghost

Description

Currently lots of swift code uses a pattern like this:

myList.filter { [some condition] }.first

A better, more performant way of doing this is as follows:

myList.first(where: { [some condition] })

There should be a rule to enforce this.

Metadata

Assignees

No one assigned

    Labels

    rule-requestRequests for a new rules.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions