Skip to content

Common pattern: conditional within loop #8

@kytrinyx

Description

@kytrinyx

Very often I see people use an enumerable method, and then stick an if/else or ternary statement or a postfix if inside of it. I generally point them to the list of enumerable methods and say that often there will be one that can do more of the heavy lifting.

Is this something that would be fairly low-cost to implement an analyzer for?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions