Describe the bug
If there is a comment in an (empty) identifier list of an import declaration, the comment floats out (which is already unwanted), but on top of that, in certain situations it's not even idempotent.
To Reproduce
The issue in a non-empty identifier list even happens here:
Even if you change the 2 into something >= 4, it's still not idempotent. Removing the 2 though, does work.
Expected behavior
The comment should not float out of the identifier list. And the change should be idempotent.
Environment
Ubuntu 22.04
Forgot which version of Ormolu, tried it on Jul 11 2023 with the newest Fourmolu and tried the corresponding Ormolu to verify (which can be found here: fourmolu/fourmolu#349)
Describe the bug If there is a comment in an (empty) identifier list of an
import
declaration, the comment floats out (which is already unwanted), but on top of that, in certain situations it's not even idempotent.To Reproduce The issue in a non-empty identifier list even happens here:
If you change the
2
into a6
, it remains idempotent, so in this case it's the reordering that causes the issue, I think.The issue within an empty identifier list happens here:
Even if you change the
2
into something >=4
, it's still not idempotent. Removing the2
though, does work.Expected behavior The comment should not float out of the identifier list. And the change should be idempotent.
Environment