Skip to content

Idempotency problem when formatting NUnit Assert.That #1740

Description

@mschlaipfer

Issue created from fantomas-online

Original code

Assert.That(
    Assert.Throws<System.Exception>(fun () -> FooFooFooFooFooFoo.BarBar.dodododo filesfiles [] outoutout |> ignore)
        .Message,
    Is.EqualTo(message)
)

Formatted code

Assert.That(
    Assert.Throws<System.Exception>
        (fun () ->
            FooFooFooFooFooFoo.BarBar.dodododo filesfiles [] outoutout
            |> ignore)
        .Message,
    Is.EqualTo(message)
)

Reformatted code

Assert.That(
    Assert.Throws<System.Exception>
        (fun () ->
            FooFooFooFooFooFoo.BarBar.dodododo filesfiles [] outoutout
            |> ignore)
            .Message,
    Is.EqualTo(message)
)

Problem description

Fantomas was not able to produce the same code after reformatting the result.

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas Master at 05/21/2021 11:35:53 - acd47bd

Default Fantomas configuration

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions