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

Bug report from fantomas-ui #517

Closed
nojaf opened this issue Oct 18, 2019 · 0 comments · Fixed by #519
Closed

Bug report from fantomas-ui #517

nojaf opened this issue Oct 18, 2019 · 0 comments · Fixed by #519

Comments

@nojaf
Copy link
Contributor

nojaf commented Oct 18, 2019

Issue created from fantomas-ui

The line comment after the { isn't printed in signature files.

Code

module RecordSignature
/// Represents simple XML elements.
type Element =
    { /// The attribute collection.
      Attributes: IDictionary<Name, string>;

      /// The children collection.
      Children: seq<INode>;

      /// The qualified name.
      Name: Name }

Result

module RecordSignature
/// Represents simple XML elements.
type Element =
    { Attributes: IDictionary<Name, string>

      /// The children collection.
      Children: seq<INode>

      /// The qualified name.
      Name: Name }

Options

Fantomas 3.0.0

Name Value
IndentOnTryWith false
IndentSpaceNum 4
KeepNewlineAfter false
PageWidth 120
ReorderOpenDeclaration false
SemicolonAtEndOfLine false
SpaceAfterComma true
SpaceAfterSemicolon true
SpaceAroundDelimiter true
SpaceBeforeArgument true
SpaceBeforeColon false
StrictMode false

Test

[<Test>]
let ``record type signature with line comment `` () =
    formatSourceString true """
module RecordSignature
/// Represents simple XML elements.
type Element =
    { /// The attribute collection.
      Attributes: IDictionary<Name, string>;

      /// The children collection.
      Children: seq<INode>;

      /// The qualified name.
      Name: Name }
"""  config
    |> prepend newline
    |> should equal """
module RecordSignature
/// Represents simple XML elements.
type Element =
    { /// The attribute collection.
      Attributes: IDictionary<Name, string>

      /// The children collection.
      Children: seq<INode>

      /// The qualified name.
      Name: Name }
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant