fsprojects / fantomas

FSharp source code formatter
https://fsprojects.github.io/fantomas
Other
758 stars 189 forks source link

Regression: Stroustrup bracket style in anonymous record type parameter is not respected #3069

Open cmeeren opened 3 months ago

cmeeren commented 3 months ago

Issue created from fantomas-online

Related: #2706

Code and expected

let private asJson (arm: IArmResource) =
    arm.JsonModel
    |> convertTo<{|
        kind: string
        properties: {| statisticsEnabled: bool |}
    |}>

Result

let private asJson (arm: IArmResource) =
    arm.JsonModel
    |> convertTo<
        {|
            kind: string
            properties: {| statisticsEnabled: bool |}
        |}
        >

Problem description

I just updated from 6.2.3 to 6.3.0. Suddenly all my anonymous record type parameters are using aligned style even though I have configured Stroustrup style.

Extra information

Options

Fantomas main branch at 2024-03-18T09:36:28Z - 74fb395e7aa953eda92ed1e06d940ffcefa1b5f0

    { config with
                MultilineBracketStyle = stroustrup }

Did you know that you can ignore files when formatting by using a .fantomasignore file? PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.