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

Non-ideal formatting on nested argument lists #594

Closed
munificent opened this issue Mar 14, 2017 · 1 comment
Closed

Non-ideal formatting on nested argument lists #594

munificent opened this issue Mar 14, 2017 · 1 comment

Comments

@munificent
Copy link
Member

Split out from #586:

Original code:

      body = combineStatements(
          new ExpressionStatement(
              lvalue.buildAssignment(
                  new VariableGet(variable), voidContext: true)),
          body);

Becomes:

      body = combineStatements(
          new ExpressionStatement(lvalue
              .buildAssignment(new VariableGet(variable), voidContext: true)),
          body);

I'm not sure why the heuristics pick the latter, but it would be nice if it could pick the former without making other code look worse.

@munificent
Copy link
Member Author

The forthcoming tall style gives you:

      body = combineStatements(
        new ExpressionStatement(
          lvalue.buildAssignment(new VariableGet(variable), voidContext: true),
        ),
        body,
      );

That looks pretty good to me. It does a better job of showing the nesting structure of the calls.

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

No branches or pull requests

1 participant