ocsigen / tyxml

Build valid HTML and SVG documents
https://ocsigen.org/tyxml/
Other
163 stars 57 forks source link

Introduce OCamlFormat #310

Closed smorimoto closed 9 months ago

smorimoto commented 1 year ago

I found a bug in refmt during this journey, so I don't think it will be merged right away, so I would like to ask for your opinion on this in the meantime...

smorimoto commented 1 year ago

The same solution is likely to help with tricky diff: https://github.com/llvm/llvm-project/blob/main/.git-blame-ignore-revs

Drup commented 1 year ago

We should write a tool that find the ocamlformat options that minimizes the size of the diff, to fit a given project's indentation style :)

Personally, I use ocp-indent more often, with the options below. I don't use ocamlformat unless a project mandates it. Is the current setting the closest to that? In any case, I should probably play with ocamlformat to find what settings I like.

I must admit I'm not fond of the numerous reformatting commits at each ocamlformat version I've seen in the projects that adopted it.

normal
with=0
syntax=mll
max_indent=2
Drup commented 9 months ago

I'm going to close this, as I don't think it necessary.