Skip to content

Automatically add parens for certain binary operator combinations #375

Open
@avh4

Description

We can't in general know the operator precedence because that would break the goal of being able to format any code consistently without having to have more info from the context. But maybe for operators that are defined in core, we could do special handling given the known precendence and associativity.

One common example is people using && and ||. We could detect this and add the recommended parentheses.

screen shot 2017-06-02 at 4 34 41 pm

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    0.9(temporary label for search filtering)discussion

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions