Open ModProg opened 2 years ago
I would be fine with adding this with a command-line flag, I think that would be a cool addition! I don't have a whole lot of extra time but would be able to help if you were interested in opening a PR, otherwise, it might be a while till I got to it?
A question, would you specify the names like cargo sort --merge log,serde
or would the merge/expand inline tables be a general thing and work on any inline table or any table with a dot in the header of dependency, dev-dep, etc?
I would say something like a max_width, either in characters or in fields. like values below get merged into one line and those above get promoted to real tables.
And for the extremes just set it to 0
or usize::MAX
.
I guess this isn't really outside the scope since cargo sort
has to know all about formatting because anytime you reorder something you also have to format.
I will have time to work on these few issues someday soonish hopefully.
I'd like an option, turning inline tables into normal tables, and vice versa.
So from
to
or
Depending on the flag / config given.