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

Bug: Formatter removes newline inside parentheses for generic type arguments #15261

Open
zw963 opened this issue Dec 10, 2024 · 1 comment
Open
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter

Comments

@zw963
Copy link
Contributor

zw963 commented Dec 10, 2024

NamedTuple(
  started: Array(Instance::Config),
  stopped: Array(Instance::Config)
).from_json(reply)

will always be format into:

NamedTuple(
  started: Array(Instance::Config),
  stopped: Array(Instance::Config)).from_json(reply)
@zw963 zw963 added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Dec 10, 2024
@zw963
Copy link
Contributor Author

zw963 commented Dec 10, 2024

The same issue happen on following code too.

Following code too longer for my screen

getter readers : Hash(IO::FileDescriptor, Instance) = {} of IO::FileDescriptor => Instance

I want to split it like this:

getter readers : Hash(IO::FileDescriptor, Instance) =
      {} of IO::FileDescriptor => Instance

But, it always revert to one-line version.

@straight-shoota straight-shoota changed the title [formatter] formatter issue Bug: Formatter removes newline inside parentheses for generic type arguments Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter
Projects
None yet
Development

No branches or pull requests

2 participants