You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing way of Fantomas deals with this problem is the previous syntax where if/then/else are formatted in three lines.
Pros and Cons
The advantages of making this adjustment to Fantomas are adhering to the style guides.
It will also simply the code base as way of formatting if/then/else is dropped. Could improve performance.
The disadvantages of making this adjustment to Fantomas are changing the behavior of two settings.
Examples
if somethingLongButNotMultilineCausingThreeliner then
foo
else
bar
is now formatted as
if somethingLongButNotMultilineCausingThreeliner
then foo
else bar
should be
if somethingLongButNotMultilineCausingThreeliner then
foo
else
bar
according to the guide.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): S to M.
Related suggestions: (put links to related suggestions here)
There was a recent change in the MS style guide regarding the
if/then/else
formatting.See https://docs.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#formatting-if-expressions
and dotnet/docs#21530.
Setting fsharp_keep_if_then_in_same_line could become obsolete.
fsharp_max_if_then_else_short_width could gain a new meaning, as the max length for writing an
if cond then e1 else e2
in one line.The existing way of Fantomas deals with this problem is the previous syntax where
if/then/else
are formatted in three lines.Pros and Cons
The advantages of making this adjustment to Fantomas are adhering to the style guides.
It will also simply the code base as way of formatting
if/then/else
is dropped. Could improve performance.The disadvantages of making this adjustment to Fantomas are changing the behavior of two settings.
Examples
is now formatted as
should be
according to the guide.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): S to M.
Related suggestions: (put links to related suggestions here)
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
The text was updated successfully, but these errors were encountered: