-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Print width not obeyed on assignments #527
Comments
Thanks for reporting this ! It is an issue only when the first element of the assignment is a new expression. Unfortunately, this part of the code is particularly complex due to the way the Java syntax is build around expressions. It should be possible to handle this use case, but I may need some time to investigate |
as it's a bug, let's start with this bounty. If it's more work than expected, I'll increase it |
In November I created a PR (#564) that fixes this, but the primary maintainer (@clementdessoude) seems to have been inactive on GitHub since then. I'm not sure who all of the maintainers of this project are, or who else may be able to review the PR (and hopefully merge it and create a new release). @pascalgrimaud Any advice? |
I'll try to contact personaly @clementdessoude and let you know |
Hi @jtkiesel ! I'm so sorry, I had a few roughs months, I put this project aside for a moment... I will have a look right now ! Thanks for notifying @pascalgrimaud ! |
@clementdessoude No worries at all! I am sorry if I came off as impatient or rude. To be honest, this is my first contribution to OSS, so I wasn't sure of the etiquette. I hope that life is treating you better! Thank you and @pascalgrimaud both! |
Prettier-Java 1.6.1
# Options: --print-width 80 --tab-width 4
Input:
Output:
Expected behavior:
I expect lines that exceed the configured print width to be broken after
=
.This used to be an issue for Prettier with JavaScript as well, see prettier/prettier#2482. However, prettier/prettier#10222 seems to have fixed most of the issues (at least for the two examples I have given, of instantiation and method return value assignment).
The text was updated successfully, but these errors were encountered: