dfmt
dfmt copied to clipboard
heuristics: line breaks in nested function calls
unittest
{
foo("123456789012345678901234567890", bar("123456789012345678901234567890", "123456789012345678901234567890"));
}
is badly reformatted as
unittest
{
foo("123456789012345678901234567890", bar("123456789012345678901234567890",
"123456789012345678901234567890"));
}
but should better be reformatted as
unittest
{
foo("123456789012345678901234567890",
bar("123456789012345678901234567890", "123456789012345678901234567890"));
}
Why is it better? Can you specify a more formal optimization goal for dfmt?
For example, if you want to minimize line length, the current behavior is better.
see Eclipse's Java formatter option: "Prefer wrapping outer expressions (keep nested expression on one line)"