Improve: preserve blank lines in sequences#814
Improve: preserve blank lines in sequences#814gpetiot merged 4 commits intoocaml-ppx:masterfrom gpetiot:preserve-seq-blank-lines
Conversation
Julow
left a comment
There was a problem hiding this comment.
Looks good !
The option change is a breaking change. But I think it for good, variant options will be easier to improve in the future than boolean options.
|
cc @Wilfred, @ELLIOTTCABLE for feedback |
|
I'm sure I'd approve (anything that improves readability and negative space, I'm happy with!); but if you want more thorough commentary, would you mind pasting a few examples (input/before-change/after-change) into the Issue? |
|
@gpetiot the logic looks good to me! My sample code from #554: Is unchanged with Before: After: My only concern is that it doesn't make sense to use |
I tend to agree with that, I will change it so it is a separate option. Edit: done, I added an option, and there is no diff with test_branch (also tested the jane street profile). |
Julow
left a comment
There was a problem hiding this comment.
Adding a blank line in a small sequence gives this:
let foo x y = do_some_setup y ;
important_function x|
I fixed this and added a test. |
|
This looks like a good candidate for |
|
@avsm can you elaborate? "ocaml avsm conventional" doesn't yield any interesting search-engine results :P |
|
This is the name of a preset profile of ocamlformat, you can use it with |
Fix #554
I changed the
break-sequencesoption, but maybe it would be better to have two options instead?