Skip to content

Bug: pipes with an argument produce incorrect output #214

@kybishop

Description

@kybishop

Here is a test case:

assert_style("c(a() |> b, foo)", "a() |> b() |> c(foo)")

Output (while messing with a local copy):

  1) test big picture unnests multiple steps that have args (Styler.Style.PipesTest)
     test/style/pipes_test.exs:19
     Styling produced unexpected results
     expected:
       a() |> b() |> c(foo)
     styled:
       b(a()) |> c(foo)

     code: assert_style("c(a() |> b, foo)", "a() |> b() |> c(foo)")
     stacktrace:
       test/style/pipes_test.exs:20: (test)

If one changes the result to the current output you get a expected styling to be idempotent, but a second pass resulted in more changes., which does actually produce the correct results, so it seems like there's some missing recursion somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions