Assignments containing a binary expression beginning with a cast now break and indent the way Prettier JavaScript does.
Example
Input
public class Test {
public static void main(String[] args) {
if (oneLevelDeep) {
if (twoLevelsDeep) {
if (threeLevelsDeep) {
int successfulCount = 0;
int failureCount = 1;
double availability = (double) successfulCount / (successfulCount + failureCount);
}
}
}
}
}
Output
public class Test {
public static void main(String[] args) {
if (oneLevelDeep) {
if (twoLevelsDeep) {
if (threeLevelsDeep) {
int successfulCount = 0;
int failureCount = 1;
double availability =
(double) successfulCount / (successfulCount + failureCount);
}
}
}
}
}
What changed with this PR:
Assignments containing a binary expression beginning with a cast now break and indent the way Prettier JavaScript does.
Example
Input
Output
Relative issues or prs:
Fix #396