Skip to content

Long signatures have additonal newline inserted and don't respect the indent from the config #1515

Closed
@lmiskiewicz-js

Description

Issue created from fantomas-online

Code

namespace Bug

val create : something_really_long : unit -> another_really_long_thing : unit -> and_another_to_make_the_line_long_enough : unit -> unit

Result

namespace Bug

val create :

    something_really_long: unit ->
    another_really_long_thing: unit ->
    and_another_to_make_the_line_long_enough: unit ->
    unit

Problem description

When there is a long signature and it gets split into multiple lines there is an additional newline inserted after the name of the function and the indentation from the config is not respected for the following arguments of the function.

Sorry if there's any information missing. I'm happy to provide any additional information that might be helpful.

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 at 03/08/2021 19:16:36 - a2fd887

    { config with
                IndentSize = 2 }

Signature file

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions