Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve wrapping of binary expressions #2479

Merged
merged 2 commits into from
Jan 4, 2024

Commits on Jan 1, 2024

  1. Configuration menu
    Copy the full SHA
    45b762d View commit details
    Browse the repository at this point in the history
  2. Wrapping a binary expression takes precedence on wrapping value argum…

    …ent list
    
    - Remove dependency from `binary-expression-wrapping` on `value-argument-wrapping` rules
    - If a binary expression is used as value argument, and it causes the max line length to be exceeded, then wrap the value argument.
    - If the left hand side of the binary expression is call expression with a lambda argument, then wrapping the lambda argument has priority over wrapping the other arguments of the call expression.
    - If the binary expression contains an elvis operator, and does not fit on a single line, than the expression is wrapped before the elvis operator.
    
    Closes #2460
    paul-dingemans committed Jan 1, 2024
    Configuration menu
    Copy the full SHA
    19dc168 View commit details
    Browse the repository at this point in the history