caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] OCamlFormat
@ 2017-10-20 16:24 Josh Berdine
  0 siblings, 0 replies; only message in thread
From: Josh Berdine @ 2017-10-20 16:24 UTC (permalink / raw)
  To: caml users

I'm pleased to announce the first release of OCamlFormat. [1]

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 consistent style.

We currently use this for the OCaml code of Infer [2] 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 at github.com/ocaml-ppx/ocamlformat.
License is MIT.

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

An opam package will be available soon.

- Josh Berdine

[1] http://fbinfer.com/blog/2017/10/20/ocamlformat-released.html
[2] https://github.com/facebook/infer

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-20 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20 16:24 [Caml-list] [ANN] OCamlFormat Josh Berdine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).