Skip to content

Poor formatting with flutter's Point constructor (WONTFIX) #531

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

Closed
Hixie opened this issue Aug 24, 2016 · 3 comments
Closed

Poor formatting with flutter's Point constructor (WONTFIX) #531

Hixie opened this issue Aug 24, 2016 · 3 comments

Comments

@Hixie
Copy link

Hixie commented Aug 24, 2016

The following code:

      Point transformed = new Point(position.x - childParentData.offset.dx,
                                    position.y - childParentData.offset.dy);

...is carefully aligned so that you can see the parallels between the x and y coordinate of the point.
However, the formatter currently turns this into the following (wrapping at 100 cols):

      Point transformed =
          new Point(position.x - childParentData.offset.dx, position.y - childParentData.offset.dy);

This is less readable.

@Hixie
Copy link
Author

Hixie commented Aug 24, 2016

Even with parents around the arguments, it doesn't get better:

  // -l 120
  Point transformed = new Point((position.x - childParentData.offset.dx), (position.y - childParentData.offset.dy));

  // -l 90
  Point transformed = new Point(
      (position.x - childParentData.offset.dx), (position.y - childParentData.offset.dy));

  // -l 80
  Point transformed = new Point((position.x - childParentData.offset.dx),
      (position.y - childParentData.offset.dy));

@Hixie
Copy link
Author

Hixie commented Aug 24, 2016

I could work around this if I had a way to say "don't format this line", like the suggestion in #530:

      Point transformed = new Point(position.x - childParentData.offset.dx,    //
                                    position.y - childParentData.offset.dy);   //

@munificent
Copy link
Member

Gated on whether or not we do any vertical alignment at all (#508).

@Hixie Hixie changed the title Poor formatting with flutter's Point constructor Poor formatting with flutter's Point constructor (WONTFIX) Sep 1, 2016
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

2 participants