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

Newlines between named arguments are not removed #1650

Open
jellynoone opened this issue Feb 16, 2025 · 1 comment
Open

Newlines between named arguments are not removed #1650

jellynoone opened this issue Feb 16, 2025 · 1 comment

Comments

@jellynoone
Copy link

Is this intentionally allowed?

void main(List<String> args) {
  calling(
    something: 'hello',

    somethingElse: 'world',

    somethingElseEntirely: '!',
  );
}

void calling({
  String? something,

  String? somethingElse,

  String? somethingElseEntirely,
}) {}
@jellynoone
Copy link
Author

Records are similarly affected:

typedef MyRecord =
    ({
      String? something,

      String? somethingElse,

      String? somethingElseEntirely,

      String? evenMore,
    });

For comparison the old formatter's output:

void main(List<String> args) {
  calling(
    something: 'hello',
    somethingElse: 'world',
    somethingElseEntirely: '!',
  );
}

void calling({
  String? something,
  String? somethingElse,
  String? somethingElseEntirely,
}) {}

typedef MyRecord = ({
  String? something,
  String? somethingElse,
  String? somethingElseEntirely,
  String? evenMore,
});

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

No branches or pull requests

1 participant