-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Class type with long variable names results in invalid formatted F# code #841
Comments
I think this is a regression introduced by this commit: ef2e6f3 |
The culprit of the regression is that the unit test is actually wrong, it's missing commas. This is something I noticed myself in G-Research coding guidelines and I fixed with a PR here: |
Hey @Bobface and @knocte, good catch. I just copied that example from the G-Research style guide and missed the comma's. We need them in this case, so @Bobface it would be great if you could work on a fix. |
@nojaf Yep that one worked for the member tuples but not for the constructor tuples. Am currently looking into where the constructors tuples are implemented. |
Issue created from fantomas-online
The formatted result for the code below is invalid F# code: The variables in the result are missing a comma
,
at the end of their corresponding lines.@nojaf I would like to work on a PR which implements the commas at the end of the lines. Let me know if you agree with this fix.
Edit: It seems like there is already a test in
TypeDeclarationTests
which checks for this behaviour:However it also checks for the wrong result.
Code
Error
Options
Fantomas Next - 4.0.0-alpha-001-1/1/1990
IndentSpaceNum
4
PageWidth
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
MaxLetBindingWidth
40
MultilineBlockBracketsOnSameColumn
false
NewlineBetweenTypeDefinitionAndMembers
false
KeepIfThenInSameLine
false
StrictMode
false
The text was updated successfully, but these errors were encountered: