Closed andre-paris closed 2 weeks ago
Prettier-Java 2.5.0
# Options (if any): --print-width 120 --bracket-same-line true
Input:
public static BigDecimal manyArgsMethod(BigDecimal arg1, BigDecimal arg2, BigDecimal arg3, BigDecimal arg4, BigDecimal arg5) { return arg1.add(arg2).add(arg3).add(arg4).add(arg5); }
Output:
public static BigDecimal manyArgsMethod( BigDecimal arg1, BigDecimal arg2, BigDecimal arg3, BigDecimal arg4, BigDecimal arg5 ) { return arg1.add(arg2).add(arg3).add(arg4).add(arg5); }
Expected behavior: Use the Bracket Line option to keep the ) { at the end of the last line instead of being alone on the next line:
) {
public static BigDecimal manyArgsMethod( BigDecimal arg1, BigDecimal arg2, BigDecimal arg3, BigDecimal arg4, BigDecimal arg5) { return arg1.add(arg2).add(arg3).add(arg4).add(arg5); }
This option is only meant to apply to HTML. See https://prettier.io/docs/en/options#bracket-line.
Prettier-Java 2.5.0
Input:
Output:
Expected behavior: Use the Bracket Line option to keep the
) {
at the end of the last line instead of being alone on the next line: