BinaryAnalysisPlatform/bap

Consider the switch to `ocamlformat` instead of `ocp-indent`.

Closed this issue · 1 comments

Modern OCaml ecosystem works on improving development tools, including indentation checkers/fixers. Ocamlformat is the most modern way to do this. Also it integrates with dune fmt seamlessly (assuming BAP will switch to Dune some time in the future). Moreover, it aims to be compatible with ocp-indent.

ivg commented

The main problem is that it will destroy the history (unless we will solve an NP problem and find a set of configuration flags that will minimize the change). The history is extremely important for us for maintenance so this cosmetic change will cost us a lot of work hours later (as we will spend more time tracking bugs).

Another reason against is that, personally, I find the default formatting style disgusting and it doesn't meet our coding standards. Yes, this could be tuned with options, but it contradicts the idea of ocamlformat that there should be just a style no matter how it looks like. So it will become a constant battle between readability and style and a fruitless battle since those two should be on the same side.

In addition, ocamlformat failed to reformat a lot of files and produced several tons of warnings, so it is clearly not ready for use.