You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
As amesgen mentioned in #741 , formatting to add trailing newline works fine. Maybe diff detection part does not detect no trailing newline.
Diff detection in --mode check uses diffText function.
Describe the bug
Related #741 ,
--mode check
does not detect no trailing newline and returns Exit code0
.To Reproduce
example.hs (no trailing newline file)
command
Expected behavior
Environment
Additional context
As amesgen mentioned in #741 , formatting to add trailing newline works fine. Maybe diff detection part does not detect no trailing newline.
Diff detection in
--mode check
usesdiffText
function.ormolu/app/Main.hs
Lines 89 to 91 in 34bdf62
This
diffText
function usesT.lines
ormolu/src/Ormolu/Diff/Text.hs
Lines 60 to 69 in 34bdf62
T.lines
works like below, so difference between "no trailing newline Text" with "formatted Text with trailing newline" is ignored?The text was updated successfully, but these errors were encountered: