Closed isaacabraham closed 1 month ago
Fantomas currently works like this, as noted in our Changelog.
Here's an example:
Check out this GitHub issue for more details.
If this were a brand-new feature request, it would also be closed, as outlined here.
Please avoid opening similar issues in the future. For discussions on these topics, visit the F# Style Guide.
I propose we format single "marker" interfaces on a single line e.g.
The existing way of Fantomas deals with this problem is ...
Pros and Cons
The advantages of making this adjustment to Fantomas are that the interface / end pattern is common when using e.g. phantom types or otherwise, whereby you may have a list of single marker interfaces used to distinguish one kind of a type from another using generics, and there may be many of them in a file e.g.
The current formatting strategy uses up four lines (including the whitespace line) rather than a single line. More importantly, I think it's much more readable with the single line approach.
etc.
The disadvantages of making this adjustment to Fantomas are that it is extra work.
Examples
See above.
Extra information
I believe that this should be something that has a fairly low cost to identify and format e.g. interfaces with no members?
Estimated cost (XS, S, M, L, XL, XXL): XS / S
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply: