-
-
Notifications
You must be signed in to change notification settings - Fork 3
Sort named parameters in constructors #28
Comments
Hi @guenth39 - thank you for the request. I have a couple questions for you.
In addition to placing them first, would you also want them to be sorted?
One concern I have is that someone may choose to break lines at arbitrary locations (within the named parameters section) and if this stylizer is going to remain self-consistent, I would think it must always break lines such that there is exactly one named parameter per line (as in your examples above). Also, I'm wondering if the very next request I get will be to sort named parameters in ALL methods, not just the constructors, and I would like to anticipate that request. So here's one proposal, let's call it "Option A" in case other options are discussed: Option A:
These would operate on all methods for consistency. Thoughts? Other proposed options? |
Hey @gmlewis Kind regards |
Thank you, Micha! |
I would like to see the plugin also sort the named parameters in a constructor, so it would fit nicely with the already sorted variables.
Perfect would be if there would also be the option to place
required
parameters first.Example
The text was updated successfully, but these errors were encountered: