Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instances where formatting formatted code produced a different result #825

Open
lue-bird opened this issue Sep 15, 2024 · 0 comments
Open

Comments

@lue-bird
Copy link

lue-bird commented Sep 15, 2024

Usually formatting things once should result in the same as formatting things twice in a row.
Here's 2 exceptions I've encountered:

One: Parenthesized if-then-else in the else branch.
For example:

a =
    if True then
        0

    else
        (if False then
            1

         else
            2
        )

first gets formatted to

a =
    if True then
        0

    else
        if False then
            1

        else
            2

then finally

a =
    if True then
        0

    else if False then
        1

    else
        2

(edit: duplicate of #634, sorry!)

Two: Having @docs TypeExposingVariants(..), elm-format correctly removes the (..) but then doesn't reorder the that member in the exposing list according to the docs tags.
On another run, these get grouped correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant