You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
infer_clone/website/blog/2017-10-20-ocamlformat-rele...

1.2 KiB

title author
OCamlFormat open-source released Josh Berdine

We are pleased to announce the first public release of OCamlFormat.

OCamlFormat is a tool to automatically format OCaml code. It follows the same basic design as refmt for Reason code, but for OCaml. In particular, it works by parsing source code using the OCaml compiler's standard parser, deciding where to place comments in the parsetree, and printing the parsetree and comments in a uniform style.

At Facebook, we currently use this for the OCaml code of Infer to enable developers to stop thinking about line breaking, indentation, parenthesization, etc., to minimize stylistic nit-picking during code review, and to make it as visually obvious as possible when the parser's interpretation of code does not match the programmer's. We use this both with integration with editors as well as a pre-commit hook.

Development is taking place on github. License is MIT.

See the github page for more info on installation, documentation, contributing, etc.