ocamlformat icon indicating copy to clipboard operation
ocamlformat copied to clipboard

Auto-formatter for OCaml code

Results 143 ocamlformat issues
Sort by recently updated
recently updated
newest added

Please don't merge this! The purpose is to visualize the diff between the current state of the ast+parser of ocamlformat and the cst+parser of ocamlformat-ng prototype (https://github.com/tarides/ocamlformat-ng), the files in...

This a rough draft for multi-version support for ocamlformat. It use first class modules to pick the specified version of ocamlformat. There are two main limitations with the design :...

https://github.com/ocaml/ocaml/pull/12236 has been merged in ocaml and contains changes to the parsetree. The changes are helping the work on the CST (https://github.com/ocaml-ppx/ocamlformat/pull/2213). This requires some more changes: (thanks @ncik-roberts for...

The indentation of the `object` keyword in class types is not ideal as it's aligned with both what came before it and with the content of the object. ```ocaml class...

Kind/style-suggestion

``` begin[@warning "-3"] try let path', dist = Dijkstra.shortest_path pgraph pv1 pv2 in let path = unwrap_path path' in Tbl.set dist_tbl ~key:(pv1, pv2) ~data:(path, dist); Some (path, dist) with Not_found...

Kind/Bug :x:

**Describe the bug** Follows #985 There are many occurrences of the `Formatting did not stabilize after 10 iterations` bug. I'm opening this dedicated issue to track progress about this bug....

Kind/Bug :x:

``` avatar@pixel:~/docs/visuals/src/spark/lib$ ll ~/.ocamlformat -rw-r--r-- 1 avatar users 33 Dec 12 00:41 /home/avatar/.ocamlformat avatar@pixel:~/docs/visuals/src/spark/lib$ ocamlformat --enable-outside-detected-project server_state.ml avatar@pixel:~/docs/visuals/src/spark/lib$ ln -s ~/.ocamlformat avatar@pixel:~/docs/visuals/src/spark/lib$ ocamlformat --enable-outside-detected-project server_state.ml ``` I tried renaming ocamlformat...

Kind/Bug :x:

I'd be nice if ocamlformat would respect spacing between different types of lines. For example, I'd like for this code: ```ocaml open Transaction_snark_tests.Util open Core_kernel open Mina_base open Signature_lib module...

Kind/style-suggestion

We have some code that looks like this: ```ocaml (a &&& b) |||| c ``` but ocamlformat rewrites it to ```ocaml a &&& b ||| c ``` which makes verifying...

Kind/style-suggestion

Given this snippet: ```OCaml match x with | EProj (rcd, fld) -> ( match infer' env rcd with | TRecord (name, rec_ty) -> ( match List.assoc_opt fld rec_ty with |...

Kind/style-suggestion