Mix formatter to remove unnecessary newlines?

Great, thank you! I’ll try it.

What about “MinimizeLines” since it tries to minimize the number of lines? Or maybe “MinimumLines”.

1 Like

I like those names. So that I do not have to decide I would suggest MinLines. It would also be a little shorter. WDYT?

Not sure “minimizing lines” is what this does. I’d call it just EnforceLineLength or some such. Keeping in mind that this should be the default behaviour of any formatter anyhow (which apparently is an opinion and not an accepted fact. :confused:).

Or maybe ConservativeWhitespace:thinking:

1 Like

SameLine isn’t bad – What comes to mind for me is UnwrapLines - this seems an apt name since we are removing wrapping.

I’m excited to try this out – I tried adding recode to a big project, but it didn’t seem to register the mix tasks for some reason. I tried in a new mix project and it worked, though. (An option to pass it a directory or file would be rad - or maybe the ability to use it from the cli outside of project context - either of those would solve my immediate problem.)

1 Like

Update: I had the dep configured wrong, after fixing it works like a champ! Thank you Marcus, this is amazing.

I like SameLine a lot. Short and IMO conveys the message well.

Another naming idea is PreferSameLine since getting all the code on the same online is not always possible.

2 Likes

Best one so far! I vote for PreferSameLine. :041:

1 Like

Thanks for all your suggestions. I have already renamed it to `EnforceLineLength". I hope that is fine for all.

1 Like