-
-
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
Fix for issue 452 #455
Fix for issue 452 #455
Conversation
…, meaning lack of parentheses no longer causes fantomas to generate invalid code
let ``attributes without parentheses on expressions``() = | ||
formatSourceString false """ | ||
[<MyValue 55>] | ||
do ()""" config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test for what happens if there are too many spaces in the attribute? (presumably they get stripped down to 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, will also add similar tests for args in parens
Thanks for your contribution! ❤️ Nowadays all new changes are done in |
Is this ready? |
There was no spacing applied between the attribute type name and its arguments. This is probably because it was assumed that they'd always be between parentheses. Now Fantomas will check to see if the arg expression for attributes is between parentheses. If it isn't then it will add a space to ensure the code generated still compiles.