colis-anr / morbig

A static parser for POSIX Shell
Other
190 stars 8 forks source link

Formatting of OCaml and Dune #158

Closed Niols closed 1 year ago

yurug commented 1 year ago

Instead of using ocp-indent, should we use ocamlformat?

Niols commented 1 year ago

Personally, I have never managed to get used to OCamlFormat. I find its rules way to rigid for a clean formatting. I have been using Topiary with some success but it is still a very young tool that will be subject to frequent changes and it is not available in package managers just yet.

Right now, the goal was just to enforce some consistency in CI, assuming that ocp-indent was pretty much already here considering that we all used Emacs and Tuareg at the time. You can actually see in the files changed that ocp-indent was pretty much respected everywhere. I am also fine enforcing something much stronger and, since I'm not the one touching the OCaml codebase the most, I don't really have a strong opinion on the tool. OCamlFormat is fine.

WDYT?

Niols commented 1 year ago

I moved the discussion on OCamlFormat to https://github.com/colis-anr/morbig/issues/160. This PR is only here to enforce automatically something that was already respected in the past.