Skip to content

Lint Suboptimal Expression Order #1193

Open
@llogiq

Description

@llogiq

(This one is nicked from fb-contrib). Lint expressions of the kind

(method)call &&/|| (no method call) {==, !=} (no method call)

e.g. potentially_expensive_check() && a == b

And suggest to reorder the subexpressions to possibly improve performance. Note that this may change behavior if potentially_expensive_check() has side effects.

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