-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Clarify constructors #21362
Comments
Hmm, I suppose this one feels the best to me: let otherThing =
new Foobar(
longname1,
longname2,
longname3,
longname4,
longname5,
longname6,
longname7
) Happy to adjust it to be more along those lines. I've found that I'll do similar formatting in the F# codebase for some or our longer calls. |
Same goes for method calls / static members. Thoughts? |
Do you mean things like let myValue =
Regex.Match(
"my longer input string with some interesting content in it",
"myRegexPattern"
)
let untypedRes =
checker.ParseFile(
fileName,
sourceText,
parsingOptionsWithDefines
) That could work. |
Yep! |
Great, this feels very consistent with the second sample of https://docs.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#formatting-discriminated-unions. Would you accept a PR here? |
Yep! |
Hello @cartermp,
I'm wondering what the style guide says about constructors and long ones in particular.
For example:
When to use multiple lines? Where to align in the indentation?
Fantomas today would format this as:
I'm asking this question in order to see if the Microsoft style guide will deviate from what the G-Research guide has in mind.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: