Describe the bug
The default formatter adds an empty line after an attribute if it finds a comment below it. That's an issue because EDoc uses comments after -types to document those types and it does not work if there is an empty line between one thing and the other.
For a more detailed explanation, check @erszcz's amazing comment here: https://github.com/inaka/worker_pool/pull/200#discussion_r1432579910
To Reproduce
Try to format a module containing this:
-opaque another_list(X) :: [X].
%% another_list() is a kind of list...
The formatter turns it into…
-opaque another_list(X) :: [X].
%% another_list() is a kind of list...
Describe the bug The default formatter adds an empty line after an attribute if it finds a comment below it. That's an issue because EDoc uses comments after
-type
s to document those types and it does not work if there is an empty line between one thing and the other. For a more detailed explanation, check @erszcz's amazing comment here: https://github.com/inaka/worker_pool/pull/200#discussion_r1432579910To Reproduce Try to format a module containing this:
The formatter turns it into…
Expected behavior The text should remain as is.