Skip to content

Fantomas wraps extra set of parenthesis around parenthesis. #921

Closed
@andrew-russell-ps

Description

Issue created from fantomas-online

Fantomas is adding an extra set of parenthesis. DataAccess.getById returns a result type. Result.okValue extracts an option type. This is all wrapped in parenthesis, then we are extracting the value with .Value. When we run the formatter, it adds an extra set of parenthesis each time.

Code

let variable =
                (DataAccess.getById moduleName.readData
                         { Id = createObject.Id }
                     |> Result.okValue).Value

Result

let variable =
    ((DataAccess.getById moduleName.readData { Id = createObject.Id }
      |> Result.okValue)).Value

Options

Fantomas Master at 06/13/2020 12:50:29 - f502c77

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
MaxValueBindingWidth 40
MaxFunctionBindingWidth 40
MultilineBlockBracketsOnSameColumn false
NewlineBetweenTypeDefinitionAndMembers false
KeepIfThenInSameLine false
StrictMode false

Activity

nojaf

nojaf commented on Jun 16, 2020

@nojaf
Contributor

I think this bug is related to the changes of FCS 36.
Are you using Fantomas 4.0.0-alpha-009 by any chance?

andrew-russell-ps

andrew-russell-ps commented on Jun 16, 2020

@andrew-russell-ps
Author

Yes

linked a pull request that will close this issueDon't add extra parenthesis for DotGet(Paren(_)) #991on Aug 7, 2020
added a commit that references this issue on Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Participants

    @nojaf@andrew-russell-ps

    Issue actions

      Fantomas wraps extra set of parenthesis around parenthesis. · Issue #921 · fsprojects/fantomas