-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Long function signature broken into two lines #492
Comments
This doesn't seem nice to me, but if it is supposed to look like this please close the issue. |
Hmm I count 112 characters for |
That depends on what the PageWidth is set to? However, I didn't spend much time with formatting F# code before, I usually just write all of this on the same line, so I don't know if the language itself allows any prettier formatting in this situation. |
PageWidth on 3.x will be 120 so something doesn't add up. |
That will solve this example. For example, if I add another parameter to this function and make it longer (as in this link) I would still have the same situation, even with PageWidth set to 120. My question is not about to what value should PageWidth be set, but how should the last line containing function parameters be formatted to differentiate it easily from function body. |
A very good question. Personally I would say that the function definition should be on one line for readability but that is only my opinion. I can't find anything immediately in the F# style guide that supports this. So we could modify this behaviour if we want. Any thoughts @jindraivanek? |
Description
Function with a lot of arguments gets broken into two lines, which is ok. However, second line then blends in with the body of the function, as it is indented at the same level and there is no line break between the arguments and the body
Repro code
This
![image](https://user-images.githubusercontent.com/25389931/65933872-8ba70080-e413-11e9-808e-52f38cf9385e.png)
turns into
Link to online example in fantomas tool.
The text was updated successfully, but these errors were encountered: