I have some F# code that calls a method written in C# with lots of parameters.
In order to make things legible I use named parameters when calling the method:
let request = Models.UserService.CreateUserRequest(
email = "email@example.com",
password = "password",
title = "title",
firstname = "firstname",
lastname = "lastname",
nickname = "nickname",
locale = "locale",
birthDate = "birthdate",
currency = "USD",
ipAddress = "127.0.0.1",
address = address,
mobilePhone = "+1 123 456 7890"
)
However I get a warning about the indentation:
warning FS0058: Possible incorrect indentation: this token is offside of context started at position (30:19). Try indenting this token further or using standard formatting conventions.
Obviously if I do not use named parameters or put everything in a single line, the warning disappears. But I want to format this in a way that is legible.
Is there a way to format a method call on multiple lines in F# without having a warning?