I decided to make clause_to_algebra a special case for spec_clause using maybe_force_breaks
The reason to try this alternative is to avoid cases such as:
which is really popular in the whatsapp code base.
This version preserves the newline after spec, but does not force it when the function parameters for the spec breaks.
The reason I made spec_clause a special case is that for other clause types there is a conflict with the break behaviour in clauses https://github.com/whatsapp/erlfmt#in-clauses where breaking the first one should result in breaking all clauses.
I decided to make
clause_to_algebra
a special case forspec_clause
usingmaybe_force_breaks
The reason to try this alternative is to avoid cases such as:which is really popular in the whatsapp code base.
This version preserves the newline after spec, but does not force it when the function parameters for the spec breaks.
The reason I made spec_clause a special case is that for other clause types there is a conflict with the break behaviour in clauses https://github.com/whatsapp/erlfmt#in-clauses where breaking the first one should result in breaking all clauses.