Closed
Description
Prettier-Java 2.6.4
# Options (if any):
print-width: 140
tab-width: 2
Input:
class Example {
void example() {
var lineLengthInAssignmentMoreThanPrintWidth = "";
lineLengthInAssignmentMoreThanPrintWidth = "1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890";
}
}
Output:
class Example {
void example() {
var lineLengthInAssignmentMoreThanPrintWidth = "";
lineLengthInAssignmentMoreThanPrintWidth = "1234567890" +
"1234567890" +
"1234567890" +
"1234567890" +
"1234567890" +
"1234567890" +
"1234567890";
}
}
Expected output:
class Example {
void example() {
var lineLengthInAssignmentMoreThanPrintWidth = "";
lineLengthInAssignmentMoreThanPrintWidth =
"1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890";
}
}
Note: long variable declarations are formatted correctly:
class Example {
void example() {
var lineLengthInAssignmentMoreThanPrintWidth =
"1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890" + "1234567890";
}
}
Metadata
Metadata
Assignees
Labels
No labels