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

Comments inside a type definition can cause issues #885

Closed
JackMatusiewicz opened this issue Jun 4, 2020 · 0 comments · Fixed by #924
Closed

Comments inside a type definition can cause issues #885

JackMatusiewicz opened this issue Jun 4, 2020 · 0 comments · Fixed by #924

Comments

@JackMatusiewicz
Copy link
Contributor

Issue created from fantomas-online

The example above shows that fantomas just removes the comments. However, if you add a comment inside the record then it rearranges the comments outside the record to appear between "private" and the record which is invalid f#

Code

type TestType =
    // Here is some comment about the type
    // Some more comments
    private
        {
            Foo : int
        }

Result

type TestType = private { Foo: int }

Result with another comment added

type TestType =
    private
    // Here is some comment about the type
    // Some more comments
    {
      // Foo
      Foo: int }

Options

Fantomas Master at 06/02/2020 18:39:46 - eee0f32

Name Value
IndentSpaceNum 4
PageWidth 120
SemicolonAtEndOfLine false
SpaceBeforeParameter true
SpaceBeforeLowercaseInvocation true
SpaceBeforeUppercaseInvocation false
SpaceBeforeClassConstructor false
SpaceBeforeMember false
SpaceBeforeColon false
SpaceAfterComma true
SpaceBeforeSemicolon false
SpaceAfterSemicolon true
IndentOnTryWith false
SpaceAroundDelimiter true
MaxIfThenElseShortWidth 40
MaxInfixOperatorExpression 50
MaxRecordWidth 40
MaxArrayOrListWidth 40
MaxLetBindingWidth 40
MultilineBlockBracketsOnSameColumn false
NewlineBetweenTypeDefinitionAndMembers false
KeepIfThenInSameLine false
StrictMode false
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