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

End-of-line comments lost when formatting multiline type function signature #1287

Closed
3 tasks
jrnail23 opened this issue Dec 17, 2020 · 0 comments · Fixed by #1596
Closed
3 tasks

End-of-line comments lost when formatting multiline type function signature #1287

jrnail23 opened this issue Dec 17, 2020 · 0 comments · Fixed by #1596

Comments

@jrnail23
Copy link

Issue created from fantomas-online

Code

namespace Test

module OrderProcessing =
  type ValidateOrder =
    CheckProductCodeExists    // dependency
      -> CheckAddressExists   // dependency
      -> UnvalidatedOrder     // input
      -> Result<ValidatedOrder,ValidationError>  // output (Result b/c one of deps returns a Result)

Result

namespace Test

module OrderProcessing =
    type ValidateOrder = CheckProductCodeExists -> CheckAddressExists -> UnvalidatedOrder -> Result<ValidatedOrder, ValidationError> // output (Result b/c one of deps returns a Result)

Problem description

There are a couple of things going on here -- there's the issue of losing all but the last comment, and there's also the issue of this function signature being forced onto one line. My max line width is set to 80, and the result's width is 164 -- this signature should be broken up over multiple lines. Even without the comments, Result<ValidatedOrder, ValidationError> begins at column 73, but ends at column 112

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 12/14/2020 16:48:17 - 93b3b1e

Default Fantomas configuration

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.

2 participants