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

Indentation warnings in record expression #2529

Open
1 of 3 tasks
SteveGilham opened this issue Sep 26, 2022 · 1 comment
Open
1 of 3 tasks

Indentation warnings in record expression #2529

SteveGilham opened this issue Sep 26, 2022 · 1 comment

Comments

@SteveGilham
Copy link

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.
  • 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 - 11c2a86

Default Fantomas configuration

@majocha
Copy link
Contributor

majocha commented Feb 28, 2023

Minimal repro.

(({R with Z = 1}))

formats to

(({ R with
    Z = 1 }))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants