ormolu
ormolu copied to clipboard
Imports do not result in minimal diffs
One of the stated goals is "The formatting style aims to result in minimal diffs", but imports do not meet this goal.
From
import Utils (
funcB,
funcC,
)
to
import Utils (
funcA,
funcB,
funcC,
)
it's one line of changed code.
However, using Ormolu's style, it's 2 lines of changed code:
import Utils
( funcB,
funcC,
)
to
import Utils
( funcA,
funcB,
funcC,
)
FWIW you also get the same issue when appending to a list or record:
x =
[ 1,
- 2
+ 2,
+ 3
]
person =
Person
{ name = "Alice",
- age = 1
+ age = 1,
+ something = True
}
This is one of the reasons I prefer Fourmolu's default configuration, because all three of these are more diff friendly with Fourmolu