fsprojects / fantomas

FSharp source code formatter
https://fsprojects.github.io/fantomas
Other
772 stars 194 forks source link

`>= 0` is on new line #982

Closed sergey-tihon closed 4 years ago

sergey-tihon commented 4 years ago

Issue created from fantomas-online

Code

let greaterThanOrEqualTo(x: obj) =
    let matches(actual: obj) =
        (unbox actual :> IComparable).CompareTo(unbox x) >= 0
    CustomMatcher<obj>(sprintf "Greater than or equal to %A" x, Func<_, _> matches)

Result

let greaterThanOrEqualTo (x: obj) =
    let matches (actual: obj) =
        (unbox actual :> IComparable).CompareTo(unbox x)
        >= 0

    CustomMatcher<obj>(sprintf "Greater than or equal to %A" x, Func<_, _> matches)

Problem description

>= 0 should not be on the new line

Extra information

Options

Fantomas Master at 07/14/2020 19:31:03 - 3416b5154ceaf908f07c34331d425aebb54ff863

Name Value
IndentSize 4
MaxLineLength 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
MaxElmishWidth 40
SingleArgumentWebMode false
AlignFunctionSignatureToIndentation false
AlternativeLongMemberDefinitions false
StrictMode false
sergey-tihon commented 4 years ago

Sorry, found right parameter to increase

[*.fs]
fsharp_max_infix_operator_expression=50