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

Update style of lambda argument #1871

Closed
3 tasks
nojaf opened this issue Aug 26, 2021 · 0 comments · Fixed by #1858
Closed
3 tasks

Update style of lambda argument #1871

nojaf opened this issue Aug 26, 2021 · 0 comments · Fixed by #1858

Comments

@nojaf
Copy link
Contributor

nojaf commented Aug 26, 2021

Issue created from fantomas-online

Code

Target.create "Build" (fun ctx ->
    // code
    // here
    ())

let printListWithOffsetPiped a list1 =
    list1
    |> List.iter (fun elem ->
        //
        printfn $"A very long line to format the value: %d{a + elem}")

Result

Target.create
    "Build"
    (fun ctx ->
        // code
        // here
        ())

let printListWithOffsetPiped a list1 =
    list1
    |> List.iter
        (fun elem ->
            //
            printfn $"A very long line to format the value: %d{a + elem}")

Problem description

As discussed in dotnet/docs#25207, the guidance for lambda's has changed.
The MS style guide was updated, see https://docs.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#formatting-function-parameter-application.
This issue is meant for tracing purposes.
Since this will have quite some user impact, the fix should be targeted against the 4.6 branch.

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 08/19/2021 16:27:53 - a80f888

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?

@nojaf nojaf linked a pull request Aug 26, 2021 that will close this issue
@nojaf nojaf closed this as completed Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant