fantomas icon indicating copy to clipboard operation
fantomas copied to clipboard

Indentation warnings in record expression

Open SteveGilham opened this issue 2 years ago • 1 comments

Not a consequence of a non-standard indent-size after all --

Issue created from fantomas-online

Code

        DotNet.test
            (fun p ->
                (({ p.WithCommon(withWorkingDirectoryVM "_Issue23") with
                                                                         Configuration = DotNet.BuildConfiguration.Debug
                                                                         NoBuild = false })
                     .WithAltCoverOptions
                     pp0
                     cc0
                     ForceTrue)
                    .WithAltCoverImportModule()
                    .WithAltCoverGetVersion()
                |> testWithCLIArguments)
            ""

Result

DotNet.test
    (fun p ->
        (({ p.WithCommon(withWorkingDirectoryVM "_Issue23") with
            Configuration = DotNet.BuildConfiguration.Debug
            NoBuild = false })
             .WithAltCoverOptions
             pp0
             cc0
             ForceTrue)
            .WithAltCoverImportModule()
            .WithAltCoverGetVersion()
        |> testWithCLIArguments)
    ""

Problem description

(4,12) (4, 25)Warning
Possible incorrect indentation: this token is offside of context started at position (3:13). Try indenting this token further or using standard formatting conventions.

(4,12) (4, 25)Warning
Possible incorrect indentation: this token is offside of context started at position (3:13). Try indenting this token further or using standard formatting conventions.

(5,12) (5, 19)Warning
Possible incorrect indentation: this token is offside of context started at position (3:13). Try indenting this token further or using standard formatting conventions.

(5,12) (5, 19)Warning
Possible incorrect indentation: this token is offside of context started at position (3:13). Try indenting this token further or using standard formatting conventions.

Extra information

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

Options

Fantomas master branch at 2022-09-20T21:08:34Z - 11c2a862e2b3828627c19ea339f2db48d556e268

Default Fantomas configuration

SteveGilham avatar Sep 26 '22 11:09 SteveGilham

Minimal repro.

(({R with Z = 1}))

formats to

(({ R with
    Z = 1 }))

majocha avatar Feb 28 '23 12:02 majocha